Independent Company Challenges
Amazon-style SQL challenges
Independent Amazon-style e-commerce, warehouse, inventory, and customer analytics SQL practice.
These independent exercises use Amazon-relevant business domains; they are not claimed to be questions used by Amazon, and this site is not affiliated with the company.
- Exercises
- 24
- Difficulty
- Beginner to Hard
What this collection tests
Skills and query patterns
Marketplace revenue, logistics, customer behavior, inventory, and operational analytics
Curated exercises
Choose a challenge
Work in the live editor where supported. Advanced guided labs state their engine boundary before you open the workspace.
- Challenge 1Beginner
Employee Warehouse Assignment
Which employees are assigned to a warehouse, and what is the warehouse location for each of them?
- Joins
SQLite live
Open challenge → - Challenge 2Beginner
Prime Member List
Which customers hold an active Prime membership?
- Filtering
SQLite live
Open challenge → - Challenge 3Beginner
Product Inventory by Category
List all products in the Electronics category with their price and current stock quantity.
- Filtering
SQLite live
Open challenge → - Challenge 4Beginner
Recent Orders
List orders placed after January 20, 2024 — show the order ID, customer full name, and order date.
- Joins
- Date analysis
- Filtering
SQLite live
Open challenge → - Challenge 5Easy
Top Rated Products by Category
Which product categories have an average customer rating above 4.0, and how many distinct products in each category have been reviewed?
- Joins
- Aggregation
- HAVING
SQLite live
Open challenge → - Challenge 6Medium
Warehouse Performance Analysis
For every warehouse, how many employees are assigned, how many shipments have been dispatched, and what is the storage capacity?
- Joins
- Aggregation
- Sorting
SQLite live
Open challenge → - Challenge 7Easy
Customer Purchase Frequency
Which customers have placed more than one order, and what is their total spend and order count?
- Joins
- Aggregation
- HAVING
SQLite live
Open challenge → - Challenge 8Hard
Seller Revenue and Performance Dashboard
For each seller with at least 2 order line items fulfilled, show their total items sold, total revenue, average product rating, and revenue rank among all sellers.
- Window functions
- Joins
- Subqueries
SQLite live
Open challenge → - Challenge 9Hard
Department Hierarchy and Salary Analysis
For every employee, show their manager's name, department, their salary gap vs their manager, their salary rank within their department, and the department average salary.
- CTEs
- Window functions
- Joins
SQLite live
Open challenge → - Challenge 10Hard
Product Replenishment Priority Analysis
Show the top 5 products most at risk of stockout — ranked by lowest stock first, then highest sales volume as a tiebreaker. Include estimated days of inventory remaining and revenue at risk.
- CTEs
- Window functions
- Joins
SQLite live
Open challenge → - Challenge 11Beginner
Recently Hired Warehouse Employees
Which warehouse employees were hired in 2024, and which warehouse are they assigned to?
- Joins
- Date analysis
- Filtering
SQLite live
Open challenge → - Challenge 12Hard
Top 2 Orders per Customer by Value
For each customer, find their top 2 highest-value orders — show the order details and the rank of each order within that customer's history.
- CTEs
- Window functions
- Joins
SQLite live
Open challenge → - Challenge 13Hard
Customer Order Frequency Analysis
Return each customer with at least 3 orders, including customer name, email, total_orders, avg_gap_days, and max_gap_days between consecutive orders.
- CTEs
- Window functions
- Joins
SQLite live
Open challenge → - Challenge 14Medium
Employees Earning Above Department Average
Which employees earn more than their department's average salary, and by how much?
- CTEs
- Joins
- Subqueries
SQLite live
Open challenge → - Challenge 15Easy
Orders Without Shipments (Fulfillment Gap)
Which orders have been placed but do not yet have a shipment record?
- Joins
- NULL handling
- Filtering
SQLite live
Open challenge → - Challenge 16Easy
Customers Inactive in February 2024
Which customers placed no orders in February 2024?
- Joins
- NULL handling
- Filtering
SQLite live
Open challenge → - Challenge 17Medium
Average Delivery Time by Carrier
Return carrier, total_shipments, and avg_delivery_days for each carrier with at least 2 completed deliveries, sorted by avg_delivery_days ascending.
- Joins
- Aggregation
- HAVING
SQLite live
Open challenge → - Challenge 18Medium
Prime vs Non-Prime Order Value Comparison
Return one Prime row and one Non-Prime row with customer_count, total_orders, avg_order_value, and total_revenue.
- Joins
- Aggregation
- CASE expressions
SQLite live
Open challenge → - Challenge 19Medium
Product Revenue Share of Marketplace
What percentage of total marketplace revenue does each product account for?
- Joins
- Subqueries
- Aggregation
SQLite live
Open challenge → - Challenge 20Beginner
Top 3 Best-Selling Products by Units Sold
Which 3 products have sold the most total units across all orders?
- Joins
- Aggregation
- Sorting
SQLite live
Open challenge → - Challenge 21Easy
Monthly Order Revenue Trend
What was the total order count and revenue for each month in 2024?
- Aggregation
- Date analysis
- Numeric functions
SQLite live
Open challenge → - Challenge 22Medium
Sellers with No Customer Reviews
Which sellers have products listed on Amazon but have received zero customer reviews across all their products?
- Joins
- Subqueries
- Aggregation
SQLite live
Open challenge → - Challenge 23Hard
Top-Spending Customer per Country
Return country, customer_name, and total_spend for exactly one top-spending customer per country, ordered by total spend descending.
- CTEs
- Window functions
- Joins
SQLite live
Open challenge → - Challenge 24Hard
Seller Review Coverage Report
For each seller, show how many products they list, how many total reviews their products have received, and what percentage of those reviews are verified purchases.
- Joins
- Aggregation
- Numeric functions
SQLite live
Open challenge →
Attempt
Write a query or design from the brief before opening any hints.
Validate
Run it against the included dataset and inspect the output.
Explain
Compare the verified answer and explain each choice aloud.
Learn before practicing Amazon
Strengthen your understanding with these targeted learning topics:
Continue practicing
Explore related company challenges
Airbnb
Independent Airbnb-style marketplace, booking, listing, payment, review, and guest analytics SQL practice.
Uber
Independent Uber-style mobility marketplace SQL practice covering trips, drivers, riders, pricing, payments, and promotions.
Microsoft
Independent Microsoft-style cloud, productivity, subscription, usage, support, and customer analytics SQL practice.
Return to the complete interview preparation experience.