Describe how you approach database queries and understanding data and databases as a data engineer.
Demonstrate your approach by producing a customer-level summary from the provided relational data. Include customers without qualifying records and identify records where a completed order has a missing amount.
customer_id ascendingcustomer_id, customer_name, completed_order_count, completed_revenue, latest_completed_order, and data_quality_flag| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer display name |
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| customer_id | INT | Customer associated with the order |
| order_date | DATE | Date on which the order was placed |
| status | VARCHAR(20) | Order processing status |
| amount | NUMERIC(10,2) | Order amount |