Amazon SQL Interview
Questions

Practice the SQL patterns Amazon uses to screen data analysts and business analysts. Real e-commerce datasets, AI-powered hints, and zero setup.

Practice Amazon SQL Questions Free →

Free to start — no credit card required

What SQL questions does Amazon ask?

Amazon's SQL questions are grounded in e-commerce and logistics data — orders, customers, products, and delivery performance. These are the most commonly reported patterns:

Hard

Customer Lifetime Value

Calculate total spend, average order value, and order count per customer. Segment into Bronze, Silver, and Gold tiers by spend.

Uses: SUM() AVG() CASE WHEN COUNT()

Practice this →
Medium

Top 3 Products per Category

For each category, find the top 3 best-selling products by revenue in the last 90 days. Include all tied products.

Uses: DENSE_RANK() PARTITION BY date filter

Practice this →
Hard

Delivery Performance

Calculate on-time delivery rate per warehouse and carrier. Find the worst-performing combinations.

Uses: CASE WHEN AVG() multi-column GROUP BY

Practice this →
Medium

Repeat Customers

Find customers who placed at least 2 orders in the same month. Return customer, month, and total orders.

Uses: DATE_TRUNC HAVING COUNT GROUP BY

Practice this →
Medium

First Purchase Category

For each customer, identify the category of their very first purchase. Calculate what % of customers started with each category.

Uses: FIRST_VALUE() ROW_NUMBER() percentage calc

Practice this →
Easy

Unshipped Orders

Find all orders that have not been shipped yet and are more than 3 days old.

Uses: LEFT JOIN IS NULL DATEDIFF

Practice this →
See all Amazon SQL questions →

SQL concepts Amazon tests most

Aggregation and grouping

Amazon questions are data-heavy. Master multi-level GROUP BY, HAVING filters, and conditional aggregation with SUM(CASE WHEN ...).

Practice aggregation →

Top-N per group

Top-N-per-group questions appear constantly at Amazon. Nail DENSE_RANK() OVER (PARTITION BY ...) and you'll have a real edge.

Practice window functions →

Anti-join patterns

Finding missing records with LEFT JOIN ... WHERE IS NULL or NOT EXISTS is extremely common at Amazon. Practice these carefully.

Practice joins →

Ready to practice?

SQL Quest covers all these Amazon patterns with AI hints and real data. Free to start.

Start Amazon SQL Practice Free →

Also preparing for other companies?