Onboarding cohort analyses need to examine each customer's initial purchase on Amazon. Write a SQL query to return each customer's first order details: `customer_id`, `order_id`, `order_date`, and `order_amount`. If a customer placed multiple orders on their earliest date, break ties deterministically by selecting the order with the smallest `order_id`. Order the final results by `customer_id ASC`. Note: Window function support requires DuckDB / full SQL engine capabilities. This question is staged for the upcoming DuckDB browser engine.
Loading…
Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.
Ask questions, share alternate queries, and explore solutions
Your recent query executions and answer checks
This will insert the verified MySQL solution into your editor so you can study how each clause transforms the table.