Free practice
SQL Interview Questions for Data Analysts
25 original interview-style problems with a real in-browser Postgres editor, instant answer checking and step-by-step solutions.
25 questions · 5 Easy · 13 Medium · 7 Hard
Showing 25 of 25 questions
- High-value UPI orders in Q1EasyWHERE & FilteringRazorpayFlipkart
- Shipments still missing a delivery timestampEasyNULL / NOT NULL HandlingOlaEXL
- Label each basket as Small, Medium or LargeEasyCASE StatementsMyntraMeesho
- Daily signups by acquisition channelEasyGROUP BYZoomInfoSwiggy
- Cities with a loyal, high-spending buyer baseMediumHAVINGWalmartTarget
- Warehouse stock summaryEasyAggregate FunctionsWalmartAmazon
- Match every order to its customerMediumJoins — Inner JoinPayPalRazorpay
- Courier partners with no shipments in FebruaryMediumJoins — Left/Right Outer JoinFlipkartRSystems
- Find every store-product listing gapHardJoins — Cross JoinTargetAmazonMeesho
- Employees earning more than their managerMediumJoins — Self JoinOracleEXL
- Second highest invoice amountMediumSubqueriesPayPalOracle
- Campaign spend efficiency with a CTEMediumCTEsSwiggyZoomInfo
- Walk the category tree and report its depthHardRecursive CTEsAmazonMyntra
- Rank support agents within their teamMediumWindow FunctionsEXLRSystemsSwiggy
- Duplicate support tickets from the same customerMediumGROUP BYZomatoTarget
- Three consecutive high-temperature readingsHardWindow FunctionsOracleWalmart
- Running revenue total by monthMediumWindow FunctionsRazorpayPayPal
- Third highest salary in every departmentHardSubqueriesOracleWalmartEXL
- Flag subscription churn riskMediumCASE StatementsZoomInfoPayPal
- Null-safe order totals with discounts and shippingMediumNULL / NOT NULL HandlingZomatoMeesho
- Products that have never been orderedMediumJoins — Left/Right Outer JoinFlipkartMyntra
- Top 3 cities by revenueMediumAggregate FunctionsSwiggyZomatoOla
- First and last purchase span per customerHardWindow FunctionsAmazonRazorpay
- Build each employee's reporting chain to the CEOHardRecursive CTEsTargetOracle
- Month-1 retention rate by signup cohortHardCTEsSwiggyMeeshoPayPal
Want interview-ready depth?
Our live cohorts cover SQL from filters to window functions, then take you through dashboards, agentic analytics workflows and mock interviews with mentor feedback.