How would you approach a take-home SQL assessment for Oscar Health, and what would you do to validate your results?
Assume the assessment includes assessment_orders and assessment_customers. Write a query that audits every order by checking its customer reference and amount, while preserving orders that fail validation.
order_id, customer_id, customer_name, amount, and validation_statusvalid, missing_customer_id, invalid_customer_reference, missing_amount, or non_positive_amountorder_id ascending| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| customer_id | INT | Referenced customer identifier |
| amount | DECIMAL(10,2) | Order amount |
| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer display name |