What SQL questions are asked in Amazon interviews?
Technical interviews at Amazon cover curated SQL and relational database queries, including joins, window functions, aggregations, and subqueries.
Curated SQL and relational database interview problems asked by Amazon, ranked by frequency with direct problem links.
# | SQL Problem | Difficulty | Frequency↓ | Acceptance | |
|---|---|---|---|---|---|
| #1757 | Recyclable and Low Fat Products3 sources | Easy | 63% | 88.6% | |
| #175 | Combine Two Tables3 sources | Easy | 53% | 79.7% | |
| #176 | Second Highest Salary3 sources | Medium | 50% | 47.5% | |
| #1148 | Article Views I3 sources | Easy | 50% | 76.7% | |
| #181 | Easy | 50% | 73.5% | ||
| #197 | Rising Temperature3 sources | Easy | 45% | 51.6% | |
| #570 | Medium | 43% | 49.2% | ||
| #1661 | Average Time of Process per Machine3 sources | Easy | 43% | 66.8% | |
| #1251 | Average Selling Price3 sources | Easy | 42% | 37.5% | |
| #595 | Big Countries3 sources | Easy | 40% | 68.6% | |
| #1193 | Monthly Transactions I3 sources | Medium | 40% | 59.4% | |
| #1070 | Product Sales Analysis III3 sources | Medium | 38% | 46.2% | |
| #584 | Find Customer Referee3 sources | Easy | 38% | 73.1% | |
| #1581 | Easy | 38% | 67.9% | ||
| #577 | Employee Bonus3 sources | Easy | 38% | 77.7% | |
| #185 | Department Top Three Salaries3 sources | Hard | 38% | 61.0% | |
| #1934 | Confirmation Rate3 sources | Medium | 38% | 62.2% | |
| #177 | Nth Highest Salary3 sources | Medium | 38% | 39.5% | |
| #180 | Consecutive Numbers3 sources | Medium | 38% | 48.8% | |
| #1280 | Students and Examinations3 sources | Easy | 38% | 61.5% | |
| #1378 | Easy | 38% | 83.6% | ||
| #178 | Rank Scores3 sources | Medium | 38% | 68.2% | |
| #1045 | Customers Who Bought All Products3 sources | Medium | 38% | 64.2% | |
| #1174 | Immediate Food Delivery II3 sources | Medium | 38% | 56.4% | |
| #1068 | Product Sales Analysis I3 sources | Easy | 38% | 85.9% | |
| #182 | Duplicate Emails3 sources | Easy | 33% | 74.0% | |
| #183 | Customers Who Never Order3 sources | Easy | 31% | 72.0% | |
| #610 | Triangle Judgement3 sources | Easy | 30% | 74.9% | |
| #1141 | User Activity for the Past 30 Days I3 sources | Easy | 29% | 51.1% | |
| #1164 | Product Price at a Given Date3 sources | Medium | 29% | 58.1% | |
| #184 | Department Highest Salary3 sources | Medium | 28% | 58.6% | |
| #196 | Delete Duplicate Emails3 sources | Easy | 27% | 66.3% | |
| #626 | Exchange Seats3 sources | Medium | 27% | 74.4% | |
| #1050 | Easy | 27% | 71.2% | ||
| #1084 | Sales Analysis III3 sources | Easy | 27% | 47.9% | |
| #1179 | Reformat Department Table3 sources | Easy | 27% | 76.3% | |
| #1211 | Queries Quality and Percentage3 sources | Easy | 27% | 53.8% | |
| #1327 | Easy | 27% | 71.8% | ||
| #1683 | Invalid Tweets3 sources | Easy | 27% | 85.2% | |
| #1341 | Movie Rating3 sources | Medium | 25% | 43.8% | |
| #550 | Game Play Analysis IV3 sources | Medium | 25% | 41.7% | |
| #1321 | Restaurant Growth3 sources | Medium | 25% | 59.2% | |
| #1633 | Easy | 25% | 60.6% | ||
| #1421 | NPV Queries3 sources | Easy | 25% | 82.9% | |
| #1479 | Sales by Day of the Week3 sources | Hard | 25% | 76.3% | |
| #1511 | Customer Order Frequency3 sources | Easy | 25% | 66.5% | |
| #1741 | Easy | 25% | 86.4% | ||
| #2324 | Product Sales Analysis IV3 sources | Medium | 25% | 75.9% | |
| #2474 | Hard | 25% | 50.4% | ||
| #579 | Hard | 25% | 49.6% |
Explore 2001 verified DSA interview questions asked by Amazon across 5 recency windows.
Direct links to database interview question sets across 75 top tech companies.
Technical interviews at Amazon cover curated SQL and relational database queries, including joins, window functions, aggregations, and subqueries.
Data engineers, backend engineers, business intelligence analysts, and data scientists at Amazon may be tested on practical database query problems relevant to the role.