SQL Interview Questions
SQL is the first thing nearly every data interview tests, usually around window functions, conditional logic and dates. These 120+ questions come from 37 companies. Start solving and check your level of preparation.
By topic
By company
Amazon15
Walmart10
Stripe8
Target8
Best Buy7
Coinbase4
Datadog4
Flipkart4
PhonePe4
Spotify4
Swiggy4
Zerodha4
Atlassian3
Blinkit3
DraftKings3
Meta3
Myntra3
Netflix3
Nykaa3
Salesforce3
Shopify3
Uber3
Airbnb2
Capital One2
DoorDash2
Google2
Mastercard2
Visa2
Etsy1
Instacart1
LinkedIn1
Lyft1
Microsoft1
Pinterest1
Robinhood1
Workday1
Zillow1
All the questions
- Active productsSQL
Targeteasy - Clearance candidatesSQL
Targeteasy - Completed trips by hour of daySQL
Ubereasy - Customers outside the US and MexicoSQL
Walmarteasy - Electronics and accessoriesSQL
Best Buyeasy - Even-numbered ordersSQL
Best Buyeasy - Hires per yearSQL
LinkedIneasy - In-stock electronicsSQL
Best Buyeasy - Inventory valueSQL
Walmarteasy - Large orders with customer namesSQL
Amazoneasy - Order amount with taxSQL
Stripeeasy - Orders above the averageSQL
Walmarteasy - Orders by statusSQL
Targeteasy - Orders in a price rangeSQL
Stripeeasy - Orders per customerSQL
Targeteasy - Orders placed in March 2024SQL
Best Buyeasy - Price bandsSQL
Amazoneasy - Pro productsSQL
Best Buyeasy - Products launched in 2024SQL
Targeteasy - Products under 50SQL
Walmarteasy - Products with no brandSQL
Amazoneasy - Salary against department totalSQL
Microsofteasy - Show missing discounts as zeroSQL
Targeteasy - Stock statusSQL
Amazoneasy - Surge share by citySQL
Lyfteasy - Total completed revenueSQL
Walmarteasy - Unfinished orders over 50SQL
Targeteasy - Average reactions per post typeSQL
Metamedium - Average sales cycleSQL
Salesforcemedium - Back to back repeatsSQL
Spotifymedium - Big orders or a loyal customerSQL
Best Buymedium - Busiest stock per clientSQL
Zerodhamedium - Cancellation rate by room typeSQL
Airbnbmedium - Cancellation split by restaurantSQL
Swiggymedium - Cheapest channel per campaignSQL
Nykaamedium - Completed versus other ordersSQL
Stripemedium - Completion rate by content typeSQL
Netflixmedium - Counting what is recordedSQL
Walmartmedium - Customers with repeat ordersSQL
Targetmedium - Customers without ordersSQL
Amazonmedium - Daily returnSQL
Coinbasemedium - Damage share of refundsSQL
Flipkartmedium - Day over day swingSQLPremium
Swiggymedium - Days from signup to first orderSQL
Stripemedium - Deepest cut per productSQL
Myntramedium - Delivery time by cuisineSQL
DoorDashmedium - Department headcount and paySQL
Salesforcemedium - Employee senioritySQL
Googlemedium - Employees and their managersSQL
Workdaymedium - Everyone in the top threeSQL
DraftKingsmedium - Fare per kilometer by citySQL
Ubermedium - High credit utilizationSQL
Capital Onemedium - Hours between scansSQL
Amazonmedium - How often it ran outSQL
Blinkitmedium - Listening time so farSQL
Spotifymedium - Low-rated driversSQL
Ubermedium - Merchants with high fraud ratesSQL
Mastercardmedium - Missed minimum paymentsSQLPremium
Capital Onemedium - Money moved by payment typeSQL
PhonePemedium - Money moved so farSQLPremium
PhonePemedium - Net balance by accountSQL
Stripemedium - Nights booked per citySQL
Airbnbmedium - Open positions by userSQL
Robinhoodmedium - Order sequence per customerSQL
Walmartmedium - Orders from enterprise customersSQL
Amazonmedium - Orders per calendar monthSQL
Walmartmedium - Orders per customer segmentSQL
Amazonmedium - Packages still movingSQL
Amazonmedium - Plan changesSQL
Shopifymedium - Points above the contest averageSQL
DraftKingsmedium - Position after each tradeSQL
Zerodhamedium - Price after discountSQL
Walmartmedium - Price dropsSQLPremium
Myntramedium - Price moved since last tradeSQLPremium
Zerodhamedium - Price per square foot by citySQL
Zillowmedium - Prime vs. standard order valueSQL
Amazonmedium - Priority mix per projectSQL
Atlassianmedium - Prize ranks with tiesSQL
DraftKingsmedium - Quiet time between incidentsSQL
Datadogmedium - Refunds so farSQLPremium
Flipkartmedium - Returns by reasonSQLPremium
Flipkartmedium - Revenue against targetSQLPremium
Swiggymedium - Revenue by countrySQL
Stripemedium - Revenue to date per merchantSQL
Shopifymedium - Salary rank within departmentSQL
Netflixmedium - Severity mix per serviceSQL
Datadogmedium - Slowest ticket per projectSQL
Atlassianmedium - Spend by channelSQLPremium
Nykaamedium - Spend to dateSQLPremium
Nykaamedium - Stage times per packageSQL
Amazonmedium - Subtasks that outlived the parentSQLPremium
Atlassianmedium - The busiest customerSQL
Amazonmedium - Three day averageSQL
Coinbasemedium - Top partners per citySQLPremium
Swiggymedium - Top reason per categorySQLPremium
Flipkartmedium - Top track per listenerSQL
Spotifymedium - Verified rating by shopSQL
Etsymedium - Weekend ordersSQL
Walmartmedium - Win rate by sales repSQLPremium
Salesforcemedium - Averages that skip NULLsSQL
Amazonhard - Card-testing patternsSQLPremium
Mastercardhard - Compare with the previous orderSQL
Best Buyhard - Cross-border share by card tierSQL
Visahard - Drawdown from the peakSQL
Coinbasehard - Each user's top categorySQLPremium
Pinteresthard - Every stockout windowSQLPremium
Blinkithard - Failures in a rowSQLPremium
PhonePehard - Highest paid in each departmentSQL
Metahard - Incidents that overlappedSQL
Datadoghard - Listening sessionsSQLPremium
Spotifyhard - Longest price holdSQLPremium
Myntrahard - Longest rising streakSQL
Coinbasehard - Longest stockout runSQL
Blinkithard - Merged outage windowsSQL
Datadoghard - Minutes from order to doorstepSQLPremium
Instacarthard - Month-over-month spend changeSQLPremium
Visahard - Monthly completed revenueSQL
Stripehard - Most-watched title in each countrySQLPremium
Netflixhard - Paid above the department averageSQL
Googlehard - Posting on consecutive daysSQLPremium
Metahard - Retries before it workedSQLPremium
PhonePehard - Running revenue over timeSQL
Stripehard - Slowest package per facilitySQL
Amazonhard - The day the position closedSQLPremium
Zerodhahard - Top restaurant in each citySQLPremium
DoorDashhard - Top spending customersSQL
Amazonhard - Unbroken runs of monthsSQL
Shopifyhard
Questions last reviewed 19 October 2026.