Problem set
Joins, aggregation, window functions on a live SQLite database.
sign in to save progress
difficulty
progress
113 problems
track · title · topic · difficulty
- sqlFilter customers by countryWHEREORDER BYeasy
- sqlCount orders per statusGROUP BYCOUNTeasy
- sqlMost expensive product per categoryGROUP BYMAXmedium
- sqlJoin orders to customersJOINeasy
- sqlRevenue per orderJOINSUMmedium
- sqlTop spending customersJOINHAVINGmedium
- sqlCustomers with no ordersLEFT JOINNULLmedium
- sqlRank salaries within departmentWindow functionshard
- sqlMonthly completed revenueDatesGROUP BYhard
- sqlSecond highest salary per departmentCTEWindow functionshard
- sqlairbnbFilter active listings by cityWHEREORDER BYeasy
- sqlairbnbTop-rated listing per cityWindow functionsJOINmedium
- sqluberAverage fare by surge bucketCASEGROUP BYmedium
- sqlstripeCount charges by statusGROUP BYCOUNTeasy
- sqlstripeRevenue by subscription planJOINGROUP BYmedium
- sqlmetaActive users who postedJOINDISTINCTeasy
- sqlmetaTop posts by like countJOINGROUP BYmedium
- sqlmetaRunning total of new usersWindow functionsDateshard
- sqlamazonProducts above average pricesubqueryeasy
- sqlamazonProducts with verified reviewsJOINGROUP BYmedium
- sqlairbnbRevenue per cityJOINGROUP BYmedium
- sqlairbnbHighest rated listing per cityWindow functionsrankinghard
- sqluberSurge trips by cityCASEGROUP BYmedium
- sqluberDriver fare running totalWindow functionsrunning totalhard
- sqlstripeCharges by statusGROUP BYCOUNTeasy
- sqlstripePayment failure rate by countryJOINCASEmedium
- sqlstripeNet monthly revenuedatesCASEhard
- sqlmetaUsers who never postedLEFT JOINNULLeasy
- sqlmetaEngagement per postLEFT JOINGROUP BYmedium
- sqlmetaReciprocal engagementself joinEXISTShard
- sqlamazonUnits sold per categoryJOINSUMeasy
- sqlamazonVerified-only ratingsfilteringHAVINGmedium
- sqlamazonMonthly revenue growthWindow functionsLAGhard
- sqlgoogleSearches per deviceGROUP BYORDER BYeasy
- sqlgoogleRevenue per campaignJOINGROUP BYmedium
- sqlgoogleDays to a user's second searchWindow functionsdateshard
- sqllinkedinApplications per job postJOINGROUP BYeasy
- sqllinkedinConnection count per memberLEFT JOINGROUP BYmedium
- sqllinkedinMutual connectionsself joinsetshard
- sqllinkedinOffer rate by seniorityCASEaggregationmedium
- sqlspotifyPlays per genreJOINGROUP BYeasy
- sqlspotifyCompletion rate per trackratiosJOINmedium
- sqlspotifyEach user's most played artistWindow functionsrankinghard
- sqldoordashAverage delivery time per cityGROUP BYAVGeasy
- sqldoordashLate delivery rate per storeCASEHAVINGmedium
- sqldoordashDasher earnings shareWindow functionsshare of totalhard
- sqlsalesforceOpen pipeline by regionWHEREGROUP BYeasy
- sqlsalesforceWin rate per repCASEratiosmedium
- sqlsalesforceQuota attainmentJOINaggregationmedium
- sqlsalesforceAverage sales cycle by industrydatesNULL handlinghard
- sqlrobinhoodTrade volume per symbolGROUP BYSUMeasy
- sqlrobinhoodNet open position valueJOINaggregationhard
- sqlrobinhoodMonthly active tradersdatesDISTINCTmedium
- sqlappleDevice activations by countryGROUP BYORDER BYeasy
- sqlappleRevenue by app categoryJOINSUMeasy
- sqlappleApps that never soldLEFT JOINNULLmedium
- sqlappleMonthly App Store revenuestrftimeGROUP BYmedium
- sqlappleAverage session length per appJOINHAVINGmedium
- sqlappleActive subscription value by planfilteringaggregationmedium
- sqlappleSpend per user with device modelJOINGROUP BYmedium
- sqlappleRunning revenue by monthWindow functionsrunning totalhard
- sqlappleMonth-over-month revenue changeLAGWindow functionshard
- sqlappleShort-lived subscriptionsdatesjuliandayhard
- sqlmicrosoftTenants by planGROUP BYSUMeasy
- sqlmicrosoftAzure spend per servicearithmeticGROUP BYeasy
- sqlmicrosoftSpend per tenant nameJOINGROUP BYmedium
- sqlmicrosoftUnresolved critical and high alertsfilteringJOINmedium
- sqlmicrosoftTeams engagement per tenantaggregationDISTINCTmedium
- sqlmicrosoftSeat utilisationJOINratiosmedium
- sqlmicrosoftChurned license valuefilteringdatesmedium
- sqlmicrosoftCompute spend share per tenantWindow functionsratioshard
- sqlmicrosoftTop spending day per tenantWindow functionsROW_NUMBERhard
- sqlmicrosoftCompute spend growth March to AprilpivotCASEhard
- sqltiktokVideos posted per creatorJOINGROUP BYeasy
- sqltiktokMost used soundsGROUP BYCOUNTeasy
- sqltiktokVideo completion rateJOINratiosmedium
- sqltiktokCoins earned per creatorJOINSUMmedium
- sqltiktokLike rate by soundJOINAVGmedium
- sqltiktokCreators without giftsNOT EXISTSanti-joinmedium
- sqltiktokWatch time per countrymulti-joinSUMmedium
- sqltiktokTop video per creatorWindow functionsROW_NUMBERhard
- sqltiktokFollower conversion after viewingEXISTSmulti-joinhard
- sqltiktokGifting rank within countryRANKpartitioned windowshard
- sqlopenaiRequests per modelGROUP BYCOUNTeasy
- sqlopenaiTotal tokens per organisationJOINSUMeasy
- sqlopenaiError and rate-limit rateCASEratiosmedium
- sqlopenaiSpend per modelJOINpricingmedium
- sqlopenaiAverage latency by modelAVGHAVINGmedium
- sqlopenaiAccounts near their token limitJOINthresholdsmedium
- sqlopenaiFine-tune success rateCASEGROUP BYmedium
- sqlopenaiOutput-to-input token ratioratioswindow functionshard
- sqlopenaiDaily spend with running totalwindow functionsrunning totalhard
- sqlopenaiHeaviest request per accountcorrelated subqueryMAXhard
- sqlsnowflakeCredits per warehouseJOINSUMeasy
- sqlsnowflakeFailed queries by userfilteringGROUP BYeasy
- sqlsnowflakeQueries that spilled to remote storageJOINfilteringmedium
- sqlsnowflakeAverage scan size per warehouse sizeJOINAVGmedium
- sqlsnowflakePoorly clustered tablesfilteringorderingmedium
- sqlsnowflakeCredit efficiency per warehousemulti-CTEratiosmedium
- sqlsnowflakeActive shares per databasefilteringGROUP BYmedium
- sqlsnowflakeShare of credits per warehouseWindow functionsshare of totalhard
- sqlsnowflakeSlowest query per userWindow functionsROW_NUMBERhard
- sqlsnowflakeDay-over-day credit changeLAGWindow functionshard
- sqldatabricksRuns per jobGROUP BYCOUNTeasy
- sqldatabricksDelta size per catalogGROUP BYSUMeasy
- sqldatabricksCluster compute hoursJOINarithmeticmedium
- sqldatabricksJob failure rateCASEratiosmedium
- sqldatabricksSpot versus on-demand spendJOINCASEmedium
- sqldatabricksTables needing compactionratiosfilteringmedium
- sqldatabricksStale vacuum auditdatesjuliandaymedium
- sqldatabricksCost per successful runmulti-joinratioshard
- sqldatabricksRecursive lineage descendantsrecursive CTEgraphshard
- sqldatabricksRun duration trend per jobLAGWindow functionshard