SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

Amazon: First Order Details

Unsolved

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.

SQL Query Editor (Ctrl+Enter to run)
0 characters · Valid
Canonical Solution Official

Official Solution is Hidden

Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.

Community Q&A & Discussion

Ask questions, share alternate queries, and explore solutions

0 comments
Asked By:
🏢 Amazon

Submission History

Your recent query executions and answer checks

Execution Pipeline:
FROM orders
Full source dataset
13 rows total
Ready. Type a query to see live execution.
Clause: Auto-Sync · AlaSQL Engine