
Orders placed in March 2024
easyOrders placed in March 2024
Best Buy SQL Interview Question
Best Buy's finance team is closing the books for March 2024 and needs every online order placed that month.
List the order_id and order_date of every order placed in March 2024.
Asked of
- Data Analyst
- Business Analyst
- BI Analyst
- Product Analyst
- Analytics Engineer
- Data Engineer
- Data Scientist
- ML Engineer
- AI Engineer
ordersTable35 rows
| Column Name | Type |
|---|---|
| order_id | BIGINT |
| customer_id | BIGINT |
| order_date | DATE |
| status | VARCHAR |
| amount | DOUBLE |
ordersExample Input
| order_id | customer_id | order_date | status | amount |
|---|---|---|---|---|
| 1012 | 7 | 2024-02-18 | completed | 295.3 |
| 1013 | 2 | 2024-02-21 | completed | 1975 |
| 1014 | 5 | 2024-02-25 | completed | 2890.5 |
| 1015 | 1 | 2024-03-01 | completed | 210 |
| 1016 | 8 | 2024-03-04 | completed | 4100 |
| 1017 | 6 | 2024-03-08 | canceled | 62 |
| 1018 | 3 | 2024-03-12 | completed | 178.25 |
| 1019 | 7 | 2024-03-16 | completed | 340.8 |
| 1020 | 4 | 2024-03-19 | completed | 525 |
| 1021 | 2 | 2024-03-23 | completed | 2150 |
Example Output
| order_id | order_date |
|---|---|
| 1015 | 2024-03-01 |
| 1016 | 2024-03-04 |
| 1017 | 2024-03-08 |
| 1018 | 2024-03-12 |
| 1019 | 2024-03-16 |
| 1020 | 2024-03-19 |
| 1021 | 2024-03-23 |
Explanation
Orders 1015 to 1021 were placed between March 1 and March 23, so all seven appear, including the one that was canceled. Order 1014 was placed on February 25, so it is left out.
The example above is a small slice of the data. Your query runs against the full tables.
Company
Best Buy
Difficulty
easy
Topic
dates
Your query
Starting the SQL engine...