Describe how you would design and implement a data engineering solution using SQL, including key components and trade-offs.
Use the provided customer, order, and order-item data. For this exercise, calculate customer metrics for completed orders placed from 2025-01-01 through 2025-03-31, while including customers with no qualifying orders. Your approach should avoid counting an order multiple times because it contains multiple items.
Output
- One row per customer with
customer_id, customer_name, completed_order_count, total_items, total_revenue, and average_order_value.
- Include customers with no qualifying orders using zero-valued metrics.
- Sort by
total_revenue descending, then customer_id ascending.