mahir_data

The question bank

SQL Questions

55questions themed around companies you'll actually interview at in the region. Solve them right here: real Postgres, in your browser.

easyApplicants with no referral code on fileFreeeasyAverage balance by account typeFreeeasyCheapest flights to a destinationFreeeasyClassify e-wallet balances into tiersFreeeasyClassify insurance policies into tiersFreeeasyClean up messy product namesFreeeasyCompleted rides by cityFreeeasyDays remaining until subscription expiryFreeeasyFind products from a specific brandFreeeasyFind Toyota listings, regardless of caseFreeeasyLabel moderation queue items by urgencyFreeeasyLine totals after a percentage discountFreeeasyOrders by statusFreeeasyProfit margin per productFreeeasySelected routes, mid-range priceFreeeasyShipped or delivered orders worth over RM 100FreeeasyShow 'Unassigned' for branches without a managerFreeeasyWallets with a healthy balanceFreemediumAd click-through conversion rate, per campaignPromediumAverage ride duration, by monthPromediumBranches beating the network's average growthPromediumBuyers active in both January and FebruaryPromediumCustomers who never orderedPromediumCustomers with no way to reach themPromediumDefect rate per production linePromediumDrivers rated above averagePromediumEmployees who out-earn their managerFreemediumEvery customer who has banked online or in a branchFreemediumEvery part, with its supplier (if assigned)PromediumFlag shipments that breached their SLAPromediumInactive subscribersPromediumLabel TNB bills as on-time, late, or unpaidPromediumMonthly fuel salesPromediumOutage duration in minutesPromediumPivot quarterly sales into columnsPromediumPlayers who churned after JanuaryPromediumRevenue per routePromediumRound fares up, round loyalty points downPromediumTop 3 restaurants by ordersPromediumTotal fuel spend per monthPromediumTotal spend per customerProhardBusiest data center in each regionProhardDay-over-day change in order volumeProhardDrivers delayed 3+ days in a rowProhardMonth-over-month change in units soldProhardPair every employee with their managerProhardPivot payment channels into columns, per merchantProhardPrevious month's revenueProhardRank customers by spendProhardRank customers by transaction amount, per branchProhardRunning total of daily salesProhardSecond most expensive product per categoryProhardSplit customers into spending quartilesProhardTotal paid, joined across three tablesProhardTotal shipped, joined across three tablesPro