SQL practice problems with solutions
Practise SQL interview questions in MySQL: joins, GROUP BY, subqueries and window functions on real tables, judged on hidden datasets, with editorials.
Where can I practise SQL interview questions?
CodeKairo's SQL problems are interview-style database questions written in MySQL: each draws its tables, shows an example with the expected result, and judges your query on hidden datasets with empty tables, ties, NULLs and duplicates. They cover the basics, joins, GROUP BY and HAVING, subqueries, window functions, strings, dates and conditional logic, from easy to hard. A failed submission shows the dataset it failed on next to the expected result, and every problem has hints and an editorial with a reference solution. Reading is free without an account; running and submitting need a free account.
1047 SQL problems written in MySQL and judged on hidden datasets. Each page draws its tables, shows an example and explains a reference solution.
Practise by topic
- SQL Basics 102 problems
- SQL Joins 440 problems
- SQL Aggregation 563 problems
- SQL Subqueries 240 problems
- SQL Window Functions 305 problems
- SQL Strings 105 problems
- SQL Dates 430 problems
- SQL Conditional Logic 265 problems
Basics
- Scholarship Shortlist by CGPA or Hackathon Wins Easy
- Canteen Orders Not Placed With the FEST50 Coupon Easy
- Main-Stage Fest Events Ranked by Rating Easy
- Bowlers Who Took a Caught-and-Bowled Wicket Easy
- High-Value UPI Transfers for Compliance Review Easy
- Library Loans Overdue on Audit Day Easy
- Prepaid High-Value Orders Awaiting Dispatch Easy
- Students Short of 75% Attendance in a Course Easy
- Pure-Veg Restaurants Rated 4.2 or Higher Easy
- Payable Amount on Surge-Priced Orders Easy
- Diamond and Master Players Who Went Quiet Easy
- Lab Reports Breaching the 24-Hour Turnaround Easy
- Employees Overdue for Probation Confirmation Easy
- Earned Leave Lapsing Above the Carry-Forward Cap Easy
- Machines Overdue for Calibration on Audit Day Easy
- Production Batches Over Two Percent Defects Easy
- Ad Campaigns Still Live at the Quarter Close Easy
- Airport Drop Trips Charged With Surge Pricing Easy
- Urgent Support Tickets Waiting More Than a Day Easy
- Ready-to-Move 2 BHK Listings Under ₹80 Lakh Easy
- Store SKUs At or Below Their Reorder Point Easy
- Annual Enterprise Accounts Signed Up in 2024 Easy
- Verified Creators With Over One Lakh Followers Easy
- T20 Innings Scored at a Strike Rate Above 150 Easy
- New Kids-Safe Originals for the Family Row Easy
- Prepaid Plans Expiring in the First Week of June Easy
- Cell Tower Dropped-Call Health Check Easy
- Completed Port-Outs by Recipient Operator Easy
- Premium New Year Stays in Goa Easy
- Flights Departing More Than an Hour Late Easy
- Airbnb: Instant Book Listings for a Last-Minute Weekend Easy
- Airbnb: Reviews Where Cleanliness Trails the Overall Rating Easy
- Airbnb: Host Payout for Each Completed Stay Easy
- Amazon: Lightning Deals That Sold Out Before Ending Easy
- Dream11: Paid Public Contests Still Under Half Full Easy
- Flipkart: Plus Members Sitting on Unused SuperCoins Easy
- Hotstar: Death-Over Ad Breaks Running Long Easy
- LinkedIn: Invitations Pending for More Than 30 Days Easy
- LinkedIn: Open-to-Work Members With a Blank Headline Easy
- Microsoft: Dev and Test VMs Still Billing Over the Weekend Easy
- Microsoft: Outlook Mailboxes at 90% of Their Quota or More Easy
- Ola: Scooters Still Below MoveOS 4.2 Easy
- Paytm: Failed Recharges Still Awaiting a Refund Easy
- PhonePe: UPI Lite Payments Above the Per-Payment Cap Easy
- Razorpay: Payment Links That Lapsed Without Payment Easy
- Spotify: Long-Form Podcast Episodes Released in 2024 Easy
- Swiggy: Instamart Orders Delivered Within 10 Minutes Easy
- Uber: Uber One Trials Ending Without Auto-Renew Easy
- Walmart: Active Rollbacks and the Savings on Each Easy
- Walmart: DC Trailers Dispatched Under 80% Full Easy
- Zomato: Hygiene Certificates Expiring in July Easy
Joins
- Employees Earning More Than Their Manager Easy
- Hostel Students Who Never Ordered From the Canteen Easy
- Admitted Patients and Their Ward Beds Easy
- Train Name and Travel Year on Every Booking Easy
- Delivery Captains Leading Five or More Riders Medium
- Costliest Auction Buy of Each Cricket Team Medium
- OTP Verification Rate of Every Account Medium
- Mock Test Sittings for Every Learner and Track Medium
- Daily Cancellation Rate Without Suspended Members Hard
- Customers Without a Verified KYC Document Easy
- Current Balance From the Account Ledger Medium
- Borrowers With Repeatedly Overdue EMIs Medium
- Credit Cards Over 30% Utilisation in September Medium
- Concerts Without a Single Sold Ticket Easy
- Box Office Revenue per Show Easy
- Library Members Blocked for Unpaid Fines Medium
- Concert Sell-Through and Sales Status Medium
- Auditorium Bookings That Clash Once Changeover Is Counted Hard
- Catalogue Products Nobody Has Wishlisted Easy
- Seller GMV From Delivered Items Easy
- Coupon Redemption Summary per Code Easy
- Sellers With a High Return Rate Medium
- Flash Sale Units Sold Inside the Sale Window Medium
- Overlapping Flash Sales on the Same Product Hard
- Courses Nobody Registered For in the Odd Semester Easy
- Students Who Accepted Offers of 10 LPA or More Easy
- Course Completion Percentage for Each Learner Medium
- Placement Rate and Top Package by Branch Medium
- Course Funnel From Enrolment to Certificate Hard
- Clashing Exam Slots in Students' Timetables Hard
- Menu Items Nobody Has Ordered Easy
- Delivered GMV of Every Dark Store Easy
- Double-Logged Rider Shifts That Overlap Hard
- Players Who Never Queued for Ranked Easy
- In-Game Store Revenue by Item Category Easy
- Player Win Rates With at Least Five Matches Medium
- Guilds With Three Active Members in the Last Week Medium
- Controlled Drug Prescriptions With Their Prescriber Easy
- Patients Seen Across Several Specialties Medium
- Ward Bed Occupancy on the Census Date Medium
- Medicines Below Their Reorder Level Medium
- Double-Booked Doctor Appointment Slots Hard
- Employees Without a Reachable Emergency Contact Easy
- Referral Bonus Owed to Each Employee Easy
- Org Chart Depth and Business Head of Every Employee Hard
- Overlapping Approved Leave Within a Team Hard
- Sensors Silent Through January Easy
- EV Charging Energy Delivered per Station Easy
- Sensor Threshold Breach Rate Medium
- Machine OEE per Planned Shift Hard
- Campaigns That Got Clicks but No Conversions Easy
- Paid Media Spend per Channel in March 2024 Easy
- Cost per Acquisition of Every Campaign Medium
- Creators Booked by Two Rival Brands at Once Hard
- Drivers Without a Single Completed Trip in March 2024 Easy
- Shipments Booked at Each Courier Hub Easy
- Drivers Qualifying for City Trip Incentives Medium
- Fleet Utilisation by Vehicle Type for One Week Medium
- Double-Booked Self-Drive Rental Cars Hard
- Open Ticket Load per Support Agent Easy
- On-Call Engineers Who Were Not Paged in March Easy
- Support Agents With a High Ticket Reopen Rate Medium
- Services Missing Their Uptime Target Medium
- Leads Never Taken on a Completed Site Visit Easy
- Society Maintenance Dues Collected per Wing Easy
- Days From First Site Visit to Booking Medium
- Co-Living Bed Occupancy by Property Medium
- Enquiry-to-Token Funnel by Lead Source Hard
- Double-Booked Beds in a Co-Living Space Hard
- Suppliers With No Purchase Order in 2024 Easy
- Warehouse Stock Value Including Empty Sites Easy
- Supplier Average Lead Time in Days Medium
- Purchase Order Lines Received Short Medium
- Warehouse Transfers Still in Transit Medium
- Supplier On-Time-In-Full Rate by Order Quarter Hard
- Products Most Often Bought in the Same Basket Hard
- Signups Who Never Created a Project Easy
- Feature Adoption, Including Features Nobody Used Easy
- Days From Signup to First Captured Payment Medium
- Seat-Based Monthly Bill for Every Workspace Medium
- Onboarding Funnel With Steps Taken in Order Hard
- MRR Movements: New, Expansion, Contraction and Churn Hard
- Posts With No Likes From Anyone but the Author Easy
- Mutual Follows Between Active Accounts Medium
- Group Chats Silent for More Than 30 Days Medium
- Friend Suggestions From Two or More Mutual Friends Hard
- Fantasy Teams That Forgot to Pick a Captain Easy
- Fantasy Gameweek Scores With the Captain's Double Points Medium
- Goalkeepers' Clean-Sheet Percentage Medium
- Profiles With No Streams Since the New Year Easy
- Watch Hours by Genre Easy
- Completion Rate of Every Series Medium
- Artist Royalties for May 2024 Medium
- Accounts Streaming Past Their Screen Limit Hard
- Dormant Prepaid Subscribers Since March Easy
- Electricity Bills Paid After the Due Date Easy
- Consumers With Repeated Late Payment Fees Medium
- Number Port Requests Breaching the 72-Hour SLA Medium
- Flight Bookings by Sales Channel Easy
- Hotel Occupancy on New Year's Eve Medium
- Passengers Who Flew a Route in Both Directions Medium
- Double-Booked Hotel Rooms Medium
- Airbnb: Hosts With No Active Listing Easy
- Airbnb: Experience Bookings and Guests per Category Easy
- Airbnb: Guests Who Came Back to the Same Host Within a Year Medium
- Airbnb: Guest Cancellation Rate by Cancellation Policy Medium
- Airbnb: Reconcile Host Payouts Against Earnings Hard
- Airbnb: Quote Stays From Nightly Prices and Discounts Hard
- Amazon: Delivery Routes Loaded Beyond Their Van's Capacity Easy
- Amazon: Return Requests With No Delivered Order Behind Them Easy
- Amazon: Alexa Requests and Households by Device Family Easy
- Amazon: Echo Buyers Who Added a Smart Plug Within 60 Days Medium
- Amazon: Referral and FBA Fees per Seller for October Medium
- Amazon: First Day Each Seller Breached the 60-Day Order Defect Rate Hard
- Amazon: Five-Star Review Bursts From Brand-New Accounts Hard
- Apple: Genius Bar No-Shows at Every Store Easy
- Apple: Developer Teams With No Approved App Yet Easy
- Apple: Apple Music Family Plans With Spare Seats Easy
- Dream11: Depositors Who Never Joined a Contest Easy
- Dream11: Saved Teams Over the 100-Credit Cap Easy
- Dream11: Contests and Prize Pools per Sport in May 2025 Easy
- Dream11: Deposits Above a User's Own Monthly Limit Easy
- Dream11: Selection Percentage of Every Player per Match Medium
- Dream11: Saved Teams Carrying Players Left Out of the XI Medium
- Dream11: Head-to-Head Fixtures Still to Play in Private Leagues Medium
- Dream11: Private Leagues Cancelled Below Their Minimum Size Medium
- Dream11: Withdrawal Requests Made Before KYC Approval Medium
- Dream11: Contest Winners From Player Points With C and VC Boosts Hard
- Flipkart: COD Orders Shipped to Pincodes Without COD Easy
- Flipkart: Active F-Assured Listings per Seller Easy
- Flipkart: Product Questions Still Waiting for an Answer Easy
- Flipkart: Pay Later Accounts Spending Past Their Limit Easy
- Flipkart: Instant Discount From Each Bank Offer Easy
- Flipkart: Pincodes Where COD Parcels Keep Coming Back Medium
- Flipkart: Products Rated Lower After Big Billion Days Medium
- Flipkart: F-Assured Sellers Missing the 24-Hour Dispatch SLA Medium
- Flipkart: Sale Shoppers Who Bought From Three Categories Medium
- Flipkart: Pay Later Bills Not Cleared by the Due Date Medium
- Flipkart: First Day a Seller Logged Three Returns in Seven Days Hard
- Google: Published Play Apps With No Installs Easy
- Google: Accounts Over Their Storage Quota Easy
- Google: March Cloud Bill for Every Project Easy
- Google: Meet Calls Where Guests Waited for a Late Host Medium
- Google: YouTube Channels Eligible for the Partner Programme Hard
- Hotstar: Plans With No Active Subscriber Easy
- Hotstar: Next-Day Views of Regional Serials Easy
- Hotstar: Watchlist Titles the Profile Never Played Easy
- Hotstar: Advertisers Owed Make-Good Impressions Medium
- Hotstar: Subscriptions With No Play in Their First Week Medium
- LinkedIn: Company Pages With No New Followers in May 2025 Easy
- LinkedIn: Learning Course Completions per Category in Q1 2025 Easy
- LinkedIn: Easy Apply Share of Applications per Job Easy
- LinkedIn: Connection Count of Every Member Medium
- LinkedIn: Members With Exactly the Same Skill Set Medium
- LinkedIn: Mutual Connections Behind Pending Invitations Hard
- LinkedIn: Applications Year over Year by Company and Quarter Hard
- LinkedIn: First- and Second-Degree Network Size Hard
- Meta: Verified WhatsApp Businesses With No Live Catalog Items Easy
- Meta: Moderation Reports Reviewed Past Their SLA Easy
- Meta: Instagram Follow-Backs Within a Week Medium
- Meta: Instagram Reels Shopping Funnel, Steps in Order Hard
- Microsoft: Licensed Users With No Successful Sign-In Easy
- Microsoft: Gamerscore Awarded per Xbox Title Easy
- Microsoft: Teams Channels Where Guests Post Most Messages Medium
- Microsoft: Xbox Players Who Unlocked Every Achievement in a Title Medium
- Microsoft: Paid but Unassigned Microsoft 365 Seats on 30 June Medium
- Microsoft: Bing Query Abandonment Rate by Market Medium
- Microsoft: Customers Billed for Both Azure and Microsoft 365 Medium
- Myntra: Orders Placed in the EORS Insider Early-Access Hours Easy
- Myntra: Live Styles With No Approved Catalogue Image Easy
- Myntra: Wishlisted Styles the Shopper Has Not Bought Yet Easy
- Myntra: Return Requests Raised After the Category's Window Easy
- Myntra: Size-Related Return Rate by Article Type and Size Medium
- Myntra: Shoppers Who Reordered the Size They Returned as Too Small Medium
- Myntra: Creator Store Commission for October 2024 Medium
- Myntra: Size Exchanges Blocked by an Unavailable Size, per Brand Medium
- Ola: Hypercharger Stations Idle Through a Whole Week Easy
- Ola: Completed Rentals Bookings per Hourly Package Easy
- Ola: Driver Licences Expiring Within 30 Days Easy
- Ola: Test Riders Who Bought Within 30 Days, per Centre Medium
- Ola: Wallet Cashback That Was Not Fully Credited Medium
- Ola: OTA Update Adoption in Its First Week, by City Medium
- Paytm: Soundbox Devices That Never Announced a Payment Easy
- Paytm: January FASTag Toll Spend for Each Vehicle Easy
- Paytm: Days Loan Deductions Took Over Half a Merchant's Settlement Medium
- Paytm: Cashback Paid Above the Per-User Campaign Cap Medium
- Paytm: Gold Buyers Whose Weighted Cost Beat the Simple Average Hard
- Paytm: FASTag Reads Charged Off the Plaza's Axle-Band Rate Hard
- Paytm: Return Flights Booked Within Ten Days Hard
- PhonePe: QR Stickers That Never Took a Successful Payment Easy
- PhonePe: Delivered Pincode Orders per Partner Store, Zeros Included Easy
- PhonePe: New Users Who Tried Three Products in Their First 30 Days Medium
- PhonePe: Three-Way Circular Transfers Within 24 Hours Hard
- Razorpay: Merchants Whose KYC Documents Are All Unverified Easy
- Razorpay: Open QR Codes That Never Received a Payment Easy
- Razorpay: Gateway Fee and Settled Amount for Each Payment Easy
- Razorpay: Chargeback Rate by Merchant Category Medium
- Razorpay: Webhook Events That Never Got a 2xx Response Medium
- Razorpay: Expense Claims Not Approved by the Claimant's Manager Medium
- Razorpay: Settlements That Don't Match Their Line Items Medium
- Razorpay: MDR Pricing Rows Added, Removed or Changed Between Snapshots Medium
- Spotify: Explicit Tracks Sitting on Kids Playlists Easy
- Spotify: Artists Who Released Nothing in 2024 Easy
- Spotify: Discover Weekly Save Rate per Listener Medium
- Spotify: Collaborative Playlists Only the Owner Edits Medium
- Spotify: Ad Load by Market Against the Four-an-Hour Cap Medium
- Spotify: Songwriter Splits That Don't Add Up to 100% Medium
- Spotify: Podcast Episode-to-Episode Listener Retention Hard
- Spotify: Playlist Pairs Sharing Half Their Available Tracks Hard
- Swiggy: Swiggy One Plans With No Order Placed Easy
- Swiggy: Packaging Charges Above the Per-Item Cap Easy
- Swiggy: Kitchens That Overshot the Promised Prep Time Easy
- Swiggy: Swiggy One Plans That Paid for Themselves Medium
- Swiggy: Partner Top-Up to the Shift Earnings Guarantee Medium
- Swiggy: Instamart Items Most Often Bought Together Hard
- Uber: Freight Loads Booked Below the Posted Rate Easy
- Uber: Promo Codes Nobody Has Redeemed Easy
- Uber: Cities With Two or More Critical Safety Reports Easy
- Uber: Promo Abuse — One Device, Many Accounts, Same Campaign Medium
- Uber: Rider Referrals That Qualified for the Bonus Medium
- Uber: Fleet Vehicles on Two Drivers' Shifts at Once Hard
- Uber: Freight Lane Rates Spiking Over the 28-Day Average Hard
- Walmart: Grocery Pickup Slots Nobody Booked Easy
- Walmart: Sam's Club Members Who Shopped Away From Home Easy
- Walmart: Shelf Gaps Still Open at the Afternoon Walk Medium
- Walmart: Substitutions Made Against the Customer's Wishes Medium
- Walmart: Pickup Slot Fill Rate by Hour of Day Medium
- Walmart: Did the Rollback Lift Daily Unit Sales? Hard
- Walmart: Department Pairs Bought Together More Than by Chance Hard
- Walmart: Understaffed Stretches on the Sales Floor Hard
- Zomato: Veg, Non-Veg and Egg Dishes on Every Menu Easy
- Zomato: Gold Members Yet to Use a Single Benefit Easy
- Zomato: Sold-Out Movie Shows on District Easy
- Zomato: Blinkit Store Items Below Their Reorder Level Easy
- Zomato: Gold Membership Renewal Rate by Plan Medium
- Zomato: Cost per Order of Each Promoted Listing Medium
- Zomato: September Photo Decisions of Every Moderator Medium
- Zomato: Cuisine Gaps in Each Locality Worth Recruiting For Hard
- Zomato: Progressive Commission on Each Restaurant's Monthly Sales Hard
- Zomato: Ratings Before and After a Hygiene Audit Hard
Aggregation
- Mobile Numbers Shared by Wallet Accounts Easy
- Clubs With Enough Members to Register Easy
- Rating Report for Each Canteen Counter Easy
- Average Selling Price of Each Canteen Item Easy
- Share of Quiz Players Who Returned the Next Day Medium
- Students Who Attended Every Fest Workshop Medium
- Monthly Ticket Refund Report by Railway Zone Medium
- Median Delivery Time of Each Restaurant Hard
- Active Deposits Held at Each Branch Easy
- Customers Holding Both Savings and Current Accounts Easy
- Civic Grievances Filed per Department Easy
- Donor Retention by First-Gift Year Hard
- Average Quiz Score for Quizzes With Three or More Attempts Easy
- Courses Where More Than a Quarter of Students Failed Medium
- Restaurants Averaging Under 3.5 Stars Easy
- Riders Missing the Delivery SLA in June 2024 Medium
- Top Two Restaurants per Cuisine by Repeat-Customer Rate Hard
- Average Completed Match Length by Game Mode Easy
- Players Reported for Cheating by Three Reporters in a Month Medium
- Completed OPD Visits per Department in March 2025 Easy
- Average Consultation Fee by Specialty Easy
- OPD No-Show Rate by Doctor Medium
- On-Payroll Headcount by Department and Work Mode Easy
- Late Punch-Ins per Employee in March 2025 Easy
- Total Team Size and Payroll Under Each Manager Hard
- Completed Work Orders and Good Units per Line Easy
- Click-Through Rate of Every Ad Group Easy
- Email Campaigns That Drove Two or More Unsubscribes Easy
- Couriers Who Missed the Delivery SLA on Over 20% of May Drops Medium
- Hosts That Hit CPU Saturation Easy
- Rate per Square Foot by Locality Easy
- Broker Site-Visit Conversion Rate Medium
- Stores Crossing ₹20,000 in Paid POS Bills Easy
- Daily Active Users From the Event Log Easy
- Power Users Active on Four or More Days a Month Medium
- Monthly Active Users, New Versus Returning Medium
- Stories Posted and Total Story Views per User Easy
- Hashtags Used on Three or More Live Posts Easy
- Creator Engagement Rate by Month Medium
- Economical Bowlers of the T20 Season Easy
- Season Attendance at Each Football Stadium Easy
- Batters Who Were Out for a Duck This Season Easy
- Football League Table With Points and Goal Difference Medium
- Net Run Rate of Every Team in the T20 League Hard
- Accounts With Two or More Kids Profiles Easy
- August Data Usage by Telecom Circle Easy
- Room Nights Sold per Hotel Easy
- Average Daily Rate by Hotel and Month Medium
- Airbnb: Average Cleaning Fee by Property Type Easy
- Airbnb: Hosts Meeting a Simplified Superhost Bar Medium
- Airbnb: Search-to-Booking Funnel by Platform Medium
- Airbnb: Rank Experiences by a Bayesian Average Rating Medium
- Airbnb: Hosts Whose Every Active Listing Is Instant Book Medium
- Amazon: Associates Meeting the 100 Units-per-Hour Pick Target Easy
- Amazon: Subscribe & Save Discount Tier per Delivery Month Easy
- Amazon: Star Rating Breakdown for Each Product Medium
- Amazon: Warehouse Bins Shared by Several Sellers Medium
- Amazon: Savings Plan Coverage of Each AWS Account Medium
- Amazon: Suggested Subscribe & Save Cadence From Reorder Gaps Hard
- Apple: App Store Apps Not Updated Since Mid-2023 Easy
- Apple: Online Orders With Both an iPhone and AirPods Easy
- Dream11: Gross Winnings, Tax Withheld and Net Payout per User Easy
- Flipkart: Orders Placed Each Day of Big Billion Days Easy
- Flipkart: Refund SLA Breaches by Product Category Medium
- Flipkart: Months Members Burned More SuperCoins Than Earned Medium
- Google: Zero-Result Searches per Locale Easy
- Google: Well-Rated Places With Enough Reviews Easy
- Google: Pixel Units Sold and Returned per Model Easy
- Google: Click-Through Rate at Every Organic Position Medium
- Hotstar: Commentary Languages Live on Each Match Easy
- Hotstar: Buffering Share of Watch Time by CDN Easy
- Hotstar: Matches That Crossed Two Crore Concurrent Viewers Easy
- Hotstar: Accounts Streaming From Three Cities in a Day Medium
- LinkedIn: Active Premium Members per Plan on Quarter End Easy
- LinkedIn: Skills Endorsed by Three or More Different People Easy
- LinkedIn: InMail Response Rate per Recruiter Easy
- LinkedIn: Invitation Acceptance With and Without a Note Medium
- LinkedIn: Members Whose Profile Views Doubled in May Medium
- LinkedIn: Most Common Reaction on Each Post Medium
- LinkedIn: Premium Free-Trial Conversion by Trial Month Medium
- Meta: Ad Accounts That Overspent Their September Limit Easy
- Meta: Quest Store Apps Rated by at Least Three Players Easy
- Meta: Ad Set Metrics Unpivoted Into Long Format Medium
- Meta: Moderators Overturned More Often Than Their Team Medium
- Microsoft: Products With Three or More Severity A Cases in March Easy
- Microsoft: Azure Q1 Cost Split by Service Family per Month Medium
- Microsoft: Teams Daily Stickiness (DAU/MAU) in March 2025 Medium
- Myntra: Most Common Return Reasons in 2024 Easy
- Myntra: M-Now Deliveries Inside the 30-Minute Promise by Store Easy
- Myntra: Monthly Net Revenue After Refunds in 2024 Medium
- Ola: Wallets Topped Up Over ₹10,000 in May 2024 Easy
- Ola: Test Ride Bookings and No-Shows per Experience Centre Easy
- Ola: Scooters With Outlier Energy Use Within Their Model Medium
- Ola: Driver-Partner Activation and Retention by Approval Month Hard
- Paytm: Wallet Users by KYC Level in Each City Easy
- Paytm: February LPG Cylinder Bookings by Gas Provider Easy
- Paytm: Digital Gold Customers Holding at Least One Gram Easy
- Paytm: Users Who Paid Electricity in Every Month of Q1 2025 Medium
- Paytm: Scratch Cards That Expired Unscratched Medium
- Paytm: Merchant Loan Outstanding as of 31 January 2025 Hard
- PhonePe: Users With Three or More Active Linked Bank Accounts Easy
- PhonePe: In-App Insurance Premium by Product Line in 2025 Easy
- PhonePe: Most Frequent UPI Decline Code at Each Remitter Bank Medium
- PhonePe: Open Share.Market Positions From the Order Book Medium
- PhonePe: Collect-Request Senders Declined More Often Than Not Medium
- Razorpay: Captured Volume by Payment Method per Merchant Easy
- Razorpay: Magic Checkout Conversion Rate by Merchant Easy
- Razorpay: Card Payment Success Rate by Issuing Bank Medium
- Razorpay: UPI Ticket Sizes in ₹1,000 Bands, Empty Bands Included Medium
- Spotify: Skips and Full Plays per Track Easy
- Spotify: Family and Duo Plans With Open Seats Easy
- Spotify: Artist Merch Revenue From Shipped Orders Easy
- Spotify: Free Listeners Who Hit the Hourly Skip Cap Medium
- Spotify: Shared Plans With Members at Different Addresses Medium
- Spotify: Artists Growing Year Over Year in Every Market Hard
- Spotify: Pro-Rata Royalty Pool Payouts for June 2024 Hard
- Swiggy: Rain Fee Collected per City Easy
- Swiggy: Dineout Restaurants With Repeat No-Shows Easy
- Swiggy: Share of Each Partner's Orders Delivered in a Batch Medium
- Swiggy: Instamart SKUs Out of Stock Across a Whole City Medium
- Swiggy: Orders That Stacked Two Platform Coupons Medium
- Swiggy: Food Customers Who Later Tried Instamart Medium
- Swiggy: GMV Report With City Subtotals and a Grand Total Hard
- Uber: Airport Queue Dispatches per Terminal Easy
- Uber: Riders Who Gave Every Rated Trip Five Stars Easy
- Uber: Drivers Gone Quiet Before the Festive Rush Medium
- Walmart: Active Walmart+ Members on 30 June by Plan Easy
- Walmart: Grocery vs General Merchandise Sales per Store Easy
- Walmart: Price Match Approval Rate by Competitor Medium
- Walmart: Repeat Receiptless Returns Across Stores Medium
- Zomato: Feeding India Cities That Raised ₹50,000 Easy
- Zomato: District Event Sell-Through by Category Medium
- Zomato: Restaurants Buying From Hyperpure Every Month of Q1 Medium
- Zomato: Most-Loved Dish of Each Restaurant and Its Complaints Hard
Subqueries
- Canteen Staff Whose Supervisor Has Left Easy
- Second-Best Innings in the College Cup Medium
- Swap Neighbouring Seats in the Exam Hall Medium
- Student With the Most Study Buddies Medium
- Canteen Menu Prices on 15 March Medium
- Crop Cover for Shared Amounts on Unique Plots Medium
- Top Reviewer and Best-Rated Dish of February Medium
- Savings Accounts Above the Bank-Wide Average Balance Easy
- Inoperative Accounts Under the Two-Year Rule Medium
- Resale Listings Marked Up Above Their Event's Average Medium
- Books With the Longest Reservation Queue Medium
- Wishlisted Products That Are Now Cheaper Medium
- Students Scoring Above Their Section's Internal Average Medium
- Backlogs Cleared on a Later Attempt Medium
- Orders Above the Customer's Own Average Basket Medium
- Restaurants Cooking Faster Than Their City Average Medium
- Players Rated Above the Average MMR Easy
- Whale Share of Monthly Store Revenue Medium
- Guild Members Above Their Guild's Average Points Medium
- Total Recruits Down Each Player's Referral Tree Hard
- Lab Tests Slower Than Their Usual Turnaround Medium
- High Performers Due for a Promotion Review Medium
- Machines Due for Preventive Maintenance by Quarter End Medium
- Batches Worse Than Their Product's Defect Rate Medium
- Last-Touch Channel for Each Conversion Medium
- Campaigns Outspending Their Channel's Average Medium
- Drivers Rated Above the Fleet Average Easy
- Latest Tracking Scan for Each Parcel Medium
- Couriers Delivering More Than Their Hub's Average in June Medium
- Agents Carrying More Than Their Team's Average Workload Medium
- Flats Owing More Than Their Wing's Average Medium
- Towers Where Every Unit Cleared March Dues Medium
- Slow-Moving SKUs Still Holding Stock Medium
- Stores Beating Their City's Average in Q1 Medium
- Active Subscriptions Above the Average MRR Easy
- Paid Accounts Dormant for Over 30 Days Medium
- Posts With More Likes Than the Platform Average Easy
- Drive-By Commenters Who Never Liked the Post Medium
- Creators Whose Latest Post Underperformed Medium
- Reshare Cascades: Size, Depth and Unique Resharers Hard
- Auction Buys Above Their Franchise's Average Price Medium
- Movies Longer Than the Average Movie Easy
- Titles Licensed in Every Region on Launch Day Medium
- Data Users Above Their Circle's Average Medium
- Hotel Rooms Priced Above the Average Tariff Easy
- Loyalty Points Expiring for Inactive Members Medium
- Repeat-Guest Retention Within 90 Days by Cohort Hard
- Amazon: Prime Day Deals Not Below the 30-Day Low Price Medium
- Apple: Component Batches Below Their Pooled Test Yield Medium
- Apple: Leaf Parts Needed for Each Mac Build Order Hard
- Apple: In-App Revenue at the Price in Effect on Each Day Hard
- Dream11: Withdrawals Right After a Deposit With No Play Between Hard
- Dream11: Second-Paid-Contest Activation Rate by Signup Month Hard
- Flipkart: Certified Buyer Reviews and Their Rating per Product Medium
- Flipkart: Big Billion Days GMV by Sale Day Against Last Year Hard
- Google: Longest YouTube Autoplay Chain in Each Session Hard
- Google: Search Experiment Lift Without Contaminated Users Hard
- Hotstar: Subscribers Who Only Ever Watch Live Sport Medium
- Hotstar: Viewers Lost During Each Rain Delay Hard
- Hotstar: Subscribers Covered on Every Playoff Match Day Hard
- LinkedIn: Applicants Holding Every Required Skill Medium
- LinkedIn: Followers Across Each Company's Affiliated Pages Hard
- Meta: Facebook Groups Where Every Admin Approved a Post Medium
- Meta: WhatsApp Business Conversation Windows Hard
- Meta: Accounts Linked to Banned Accounts Through Shared Devices Hard
- Microsoft: OneDrive Files Whose Full Path Is Too Long to Sync Hard
- Microsoft: Management Groups Whose Rolled-Up Azure Spend Tops Budget Hard
- Microsoft: Azure Prepayment Balance and Overage Month by Month Hard
- Myntra: Styles Marked Down by at Least 40% for EORS Day One Medium
- Myntra: Wishlist-to-Purchase Conversion by Article Type Medium
- Myntra: Styles Most Shoppers Say Run Small Medium
- Myntra: EORS First-Time Buyers Who Ordered Again Within 90 Days Hard
- Paytm Money: SIP Investor Retention Three Months Later by Cohort Hard
- Paytm: Daily Seats Sold for Every Day of a Movie's Run Hard
- Paytm: Spending Before and After Cashback for Each Campaign Hard
- PhonePe: Motor Policy Renewal Rate by Expiry Month Medium
- PhonePe: Users Who Only Send, Only Receive or Do Both in October Medium
- Razorpay: Subscription Cycles Recovered by Retry vs Halted Medium
- Razorpay: Merchants Whose Live Methods Differ From Their Request Hard
- Razorpay: Queued Payouts Rejected for Insufficient Balance Hard
- Razorpay: Subscription Billing Cycles With No Charge Attempt Hard
- Spotify: Listeners Who Played an Album Front to Back Medium
- Uber: Airport Queue Position When Each Driver Arrived Medium
- Uber: UberX Share Requests Matched With a Co-Rider Medium
- Uber: Evening Hours Where Requests Outran Online Drivers Hard
- Walmart: Clearance Items Marked Down Three Times With No Sale Medium
- Walmart: Assigning Pallets to Trailers Under a Weight Limit Hard
Window Functions
- Faculty Pay Against the Department Average Easy
- Quiz Team Standings With Shared Places Medium
- Readings From a Stuck Cold-Storage Sensor Medium
- Last Rider Into the Ropeway Cabin Medium
- Gym Members' First and Latest Branch Medium
- Cloud Kitchen Seven-Day Moving Average Medium
- Top Three Run Totals in Every League Team Hard
- Busy Streaks at the Book Fair Hard
- Largest Debit on Each Savings Account Medium
- Branch Deposits Against the Previous Calendar Month Medium
- Running Wallet Balance After Every Transaction Medium
- Rapid Repeated UPI Transfers: a Fraud Signal Hard
- Longest Run of Consecutive Missed Loan Instalments Hard
- Median Card Spend by Merchant Category Hard
- Days From Account Opening to a ₹1 Lakh Balance Hard
- Constituency Winners From Booth-Level Counts Medium
- Change Between a Donor's First and Latest Gift Medium
- Wards With Complaint Streaks of Three Days or More Hard
- Reservation Holders to Notify After Today's Returns Hard
- First Day a Member's Fine Balance Reached ₹500 Hard
- Median Days to Close Service Requests by Department Hard
- Blocks of Three or More Free Adjacent Concert Seats Hard
- Best-Rated Product in Each Category Medium
- Customers Whose First Order Used a Coupon Medium
- Monthly GMV Against the Previous Calendar Month Medium
- Shopping Sessions Abandoned After Add to Cart Hard
- Median Delivery Days per Courier Partner Hard
- Top Three Sellers per Category in Q4, With Ties Hard
- Longest Daily Selling Streak per Seller Hard
- The Redemption That Exhausted Each Coupon Budget Hard
- First Student to Submit Each Assignment Medium
- Students Whose SGPA Fell by More Than One Point Medium
- Longest Daily Learning Streak of Each Learner Hard
- Median CGPA of Each Branch Hard
- Top Three Scores in Each National Mock Test Hard
- Day Each Branch Crossed 50% Placement Hard
- Best-Selling Dish of Each Restaurant Medium
- Month-Over-Month Delivered GMV Change by City Medium
- Customers Whose Second Order Came Within a Week Medium
- Longest On-Time Delivery Streak of Each Rider Hard
- Rider Cash-in-Hand Between Deposits Hard
- Top In-App Spender in Each Region for 2025 Medium
- Ranked Tier Demotions Between Weekly Snapshots Medium
- Each Player's First Store Purchase After Sign-up Medium
- Longest Daily Login Streak per Player Hard
- Battle Pass Race to Tier 30, Season by Season Hard
- Peak Concurrent Game Sessions per Server Region Hard
- Median Completed Match Duration by Game Mode Hard
- Patients Readmitted Within 30 Days of Discharge Medium
- Most Prescribed Drug in Each Department Medium
- Diabetic Patients Whose Latest HbA1c Improved Medium
- ICU Over-Capacity Streaks Hard
- Median Length of Stay by Ward Hard
- Patients With Three or More No-Shows in a Row Hard
- Salary Hike Percentage at the April 2025 Appraisal Medium
- Appraisal Ratings Falling Two Cycles Running Medium
- Unplanned Absence Streaks of Three Working Days Hard
- Median CTC for Each Job Level Hard
- Leave Ledger Entries That Took the Balance Negative Hard
- Top Operators per Shift by Good Output Medium
- Solar Generation Sharp Day-Over-Day Drops Medium
- Longest Defect-Free Batch Streak per Line Hard
- Merged Alarm Downtime per Machine Hard
- Sustained Vibration Breach Episodes Hard
- Median EV Charging Session Length by City Hard
- Service-Due Day in Each Maintenance Cycle Hard
- Top Two Ads by Conversions in Each Campaign Medium
- Month-over-Month Ad Spend Change by Channel Medium
- First-Touch vs Last-Touch Revenue by Channel Hard
- Streaks of Three or More Overspent Days Hard
- Ad-Click Sessions per Shopper Hard
- Median Daily Spend of Each Channel Hard
- Top-Earning Driver in Each City for Q1 2024 Medium
- Driver Idle Gaps Longer Than 90 Minutes Medium
- Each Driver's Longest Streak of Active Days Hard
- Rider App Sessions and Booking Conversion Hard
- The Day Each Driver Hit the Monthly ₹10,000 Target Hard
- Median Pickup-to-Drop Minutes in Each Delivery Zone Hard
- Slowest Endpoint in Each Service Medium
- Customers Contacting Support Again Within a Week Medium
- Agent CSAT Rank Within Each Support Team Medium
- 90th Percentile API Latency per Endpoint Hard
- Longest Streak of Clean Deploys per Service Hard
- Total Outage Minutes per Service With Overlaps Merged Hard
- Sessionise API Calls and Count Server Errors Hard
- Median Time to Resolve Incidents by Severity Hard
- Costliest Rental Listing in Each City Medium
- Vacancy Gaps Between Tenants of a Flat Medium
- Each Broker's Best Month by Deal Value Medium
- Tenants Late on Rent Three Months Running Hard
- Median Registered Rate per Sq Ft by Locality Hard
- Top Two Agents per City by Commission, Ties Included Hard
- Top-Selling SKU in Each Store, Ties Included Medium
- Store Revenue Against the Previous Calendar Month Medium
- FIFO Valuation of the Stock Left on Hand Hard
- Longest Consecutive Stock-Out Run per SKU Hard
- First Day a SKU's Stock Falls Below Its Reorder Point Hard
- Median Supplier Lead Time From Goods Inward Hard
- Monthly Paid Revenue and Its Change From Last Month Medium
- Top Two Features in Every Pricing Plan Medium
- Upgrades, Downgrades and Lateral Plan Moves Medium
- User Sessions From Thirty-Minute Event Gaps Hard
- Longest Daily Usage Streak per User Hard
- Median Days From Trial to Paid by Acquisition Channel Hard
- Each Creator's Most-Liked Post Medium
- Sharp Follower Drops Between Daily Snapshots Medium
- Average Reply Time in Direct Messages Hard
- Longest Daily Posting Streak per Creator Hard
- Median Likes per Creator Hard
- App Sessions From the Event Stream Hard
- Highest Batting Partnership in Each T20 Match Medium
- Best Bowling Figures of Each Bowler This Season Medium
- Monthly Fantasy Contest Entries and the Change From Last Month Medium
- Longest Winning Streak of Each Football Club Hard
- The Over in Which Each T20 Innings Passed 100 Runs Hard
- Median Fantasy Points per Gameweek by Player Role Hard
- Orange Cap Leader After Every Match Day Hard
- Most-Streamed Artist in Every Genre Medium
- Classify Every Plan Change as Upgrade or Downgrade Medium
- Monthly Subscription Revenue With a Running Total Medium
- Binge-Watch Runs of Three or More Episodes Hard
- Longest Daily Listening Streak per Listener Hard
- Median Session Length by Device Hard
- Units Consumed From Cumulative Meter Readings Medium
- Most Recharged Prepaid Plan in Each Circle Medium
- Busiest Calling Hour per Cell Tower Medium
- Prepaid Service Lapses Between Recharges Medium
- Longest Streak of Heavy Data Days Hard
- Feeder Downtime After Merging Overlapping Outages Hard
- Median Completed Call Duration per Tower Hard
- Top Two Data Consumers per Circle, Ties Included Hard
- Electricity Bill Settlement From Part Payments Hard
- Waitlist Positions on a Train per Class Medium
- Top Two Agencies by Commission Each Quarter Medium
- Flights Delayed Three or More Days in a Row Hard
- Peak In-House Guests per Hotel Hard
- Median Departure Delay per Airport Hard
- App Sessions That End in a Hotel Booking Hard
- Date Each Frequent Flyer Qualified for Gold Hard
- Airbnb: Most-Wishlisted Listing in Each City Medium
- Airbnb: Listings Whose Latest Review Scored Lower Medium
- Airbnb: Longest Open Stretch on Each Listing's Calendar Hard
- Airbnb: Collapse Nightly Prices Into Rate Periods Hard
- Airbnb: Back-to-Back Stays Merged Into Trips Hard
- Airbnb: Hosts With Three Cancellations Inside 30 Days Hard
- Airbnb: Attribute Each Booking to Its Last Search Hard
- Amazon: Buy Box Winner for Each ASIN Medium
- Amazon: Kindle Reading Sessions That Ended Behind the Last One Medium
- Amazon: Route Stops Delivered Out of the Planned Order Medium
- Amazon: Straight-Line Distance Driven on Each Delivery Route Medium
- Amazon: Clearing Price of Each Sponsored Products Auction Hard
- Amazon: Package Dwell Time at Each Facility Visit Hard
- Amazon: AWS Promotional Credits Applied Month by Month Hard
- Amazon: Packing Station Backlog Carried Hour to Hour Hard
- Apple: Category Leaders by Q4 Net App Revenue Medium
- Apple: Genius Bar Repeat Visits Within 14 Days Medium
- Apple: Apple Pay Monthly Volume Change by Country Medium
- Apple: Each Product Line's Share of Store Revenue Medium
- Apple: Running iCloud+ Subscriber Count by Day Medium
- Apple: New and Cumulative Unique Apple Arcade Players by Day Medium
- Apple: Subscription Billing Lapses Recovered in the Grace Period Hard
- Apple: Apps Breaking Into Their Category's Top Three Hard
- Apple: Launch-Day Pre-Orders Filled Strictly in Queue Order Hard
- Apple: Apple Pay Rolling Seven-Day Fraud Rate Hard
- Dream11: Most-Picked Captain in Every Match Medium
- Dream11: The Moment Each Contest Filled Up Medium
- Dream11: Each Player's Form Over Their Last Three Matches Medium
- Dream11: Contest Prizes When Tied Teams Share a Rank Hard
- Dream11: Longest Run of Matches With the Same Captain Hard
- Dream11: Top Three Users by Net Winnings in Each Sport Hard
- Dream11: Biggest Live Leaderboard Climb of Each Team Hard
- Flipkart: Top Three Brands per Category Plus an Others Line Medium
- Flipkart: Running GMV Through the Sale by Category Medium
- Flipkart: SuperCoins Left in Each Earn Batch After FIFO Burns Hard
- Flipkart: Month-to-Month Sales Quartile Movement Matrix Hard
- Flipkart: Sale-Acquired Buyers Who Came Back for the Next Sale Hard
- Flipkart: Unscanned Ekart AWB Numbers as Ranges per Hub Hard
- Flipkart: How Often Each Product's Buy Box Changed Hands Hard
- Google: Local Guides Whose Ratings Turned Harsher Medium
- Google: Play Installs Removed Within a Week Medium
- Google: Searches Reformulated Within a Minute Medium
- Google: Longest Heartbeat Gap of Each Nest Device Medium
- Google: Cloud Cost Spikes Against the Trailing Week Medium
- Google: Play Service Fee and the Purchase That Crossed the Tier Hard
- Google: Cloud VM Cost With Machine Types Filled Forward Hard
- Google: Prorated Workspace Seat-Days for June 2025 Hard
- Google: Median First-Reply Time in Gmail Support Threads Hard
- Hotstar: Biggest Over-on-Over Jump in Viewers Medium
- Hotstar: Worst Rebuffering CDN and Device in Each City Medium
- Hotstar: Top Two Shows per Language by Unique Viewers Medium
- Hotstar: Final-Day Paid Sign-Ups by Hour With a Running Total Medium
- Hotstar: Peak of Three-Sample Smoothed Concurrency per Match Hard
- Hotstar: 90th-Percentile Video Start Time by CDN Hard
- Hotstar: Commentary Feed Switches and Final Language per Viewer Hard
- Hotstar: Deduplicated Watch Minutes Across Overlapping Devices Hard
- LinkedIn: Jobs Reposted Within 30 Days Medium
- LinkedIn: Running Follower Count of Company Pages Medium
- LinkedIn: Merge Overlapping Premium Periods Into Spans Hard
- LinkedIn: Top Endorsed Skill per Industry and Its Lead Hard
- LinkedIn: Boomerang Hires in Members' Work History Hard
- Meta: Last-Click Attributed Revenue by Campaign Medium
- Meta: Advertisers Whose Spend Fell Three Months Running Medium
- Meta: Running Quest Store Revenue per Developer Medium
- Meta: Growth Accounting of Monthly Active Users Hard
- Meta: Each Reels Creator's Percentile Rank Within Their Country Hard
- Meta: The Day Each Campaign Exhausted Its Lifetime Budget Hard
- Microsoft: Days Between Windows Insider Flights per Channel Medium
- Microsoft: Top Human Contributor per GitHub Repository in 2025 Medium
- Microsoft: Teams Attendees Present for at Least 75% of a Meeting Hard
- Microsoft: Xbox Hunters With the Most Rare Achievements Hard
- Microsoft: Bing Search Sessions That Ended Without a Click Hard
- Microsoft: Game Pass Win-Back Rate by Cancellation Month Hard
- Myntra: Jeans Buyers Whose Waist Size Changed Between Orders Medium
- Myntra: Each Brand's Share of Its Category in the EORS Hard
- Myntra: Each Brand's Three Most-Wishlisted Styles in One Row Hard
- Myntra: Sizes Over-Represented in Size Returns per Article Type Hard
- Myntra: The Few Brands Making Up 80% of Each Category's Sale Revenue Hard
- Myntra: Serial Returners by Their Last Five Delivered Orders Hard
- Ola: Busiest Hour of the Day at Each Hypercharger Medium
- Ola: New Riders Who Took a Second Ride Within 7 Days Medium
- Ola: Driver-Partners Cleared on All Four Documents Medium
- Ola: Riders Whose Main Ride Moved From Auto to Cabs Medium
- Ola: Each Scooter's Opening and Closing Readings per Day Hard
- Ola: Peak Simultaneous Charging Sessions at Each Station Hard
- Ola: First Fault Code After Each Software Install Hard
- Paytm: Runner-Up Movie by Seats Sold in Each City Medium
- Paytm Money: SIPs That Bounced Twice in a Row Medium
- Paytm: Busiest Day for Each EDC Card Machine Medium
- Paytm: Mobile Numbers That Switched Operator Between Recharges Medium
- Paytm: Merchant Days When QR Collections Fell by More Than Half Medium
- PhonePe: Top District by Transaction Count in Each State, Q2 2025 Medium
- PhonePe: Users Whose First Successful Payment Was at a Merchant Medium
- PhonePe: Users Paying Three New Payees Within One Hour Hard
- PhonePe: Failed UPI Payments Recovered by a Retry, per Bank Hard
- PhonePe: Bank Downtime Runs From Consecutive Technical Declines Hard
- PhonePe: Merchant-Spend Quartiles of Users in Each City, March 2025 Hard
- PhonePe: Districts Whose State Rank Rose Every Quarter of 2024 Hard
- PhonePe: Merchants Earning Half Their Takings From Three Customers Hard
- Razorpay: Leading Card Network in Each Merchant Category Medium
- Razorpay: Payments Settled After Their T+N Working Day Hard
- Razorpay: Orders Rescued by Switching Payment Method Hard
- Razorpay: Merchants Whose Weekly Success Rate Fell 10+ Points Hard
- Spotify: Wrapped Top Artist of Every Listener Medium
- Spotify: Artists Not Touring Their Top Listening City Medium
- Spotify: Family Plans That Ever Had Over Six Members at Once Hard
- Spotify: Weekly Top 3 Chart With New, Re-Entry, Up and Down Labels Hard
- Spotify: Listeners Whose Top Genre Changed From Q1 to Q2 Hard
- Swiggy: Longest Idle Gap in a Partner's Day Medium
- Swiggy: Busiest Instamart Store per City Each Month Medium
- Swiggy: Swiggy Money Debits That Overdrew the Wallet Medium
- Swiggy: Third Delivered Order of Each New Customer Hard
- Swiggy: Restaurant Offline Minutes Within Opening Hours Hard
- Swiggy: Kitchens Slowing Down Three Weeks Running Hard
- Swiggy: Instamart Picking Bags From Order Lines Hard
- Uber: Uber Eats Orders Handed to Another Courier Medium
- Uber: Uber Pro Leaderboard Around Driver 107 in Pune Medium
- Uber: Back-to-Back Trips Starting in the Last Drop Zone Medium
- Uber: Longest Surge Episode in Each Zone Hard
- Uber: Split Fare Shares to the Paisa Hard
- Uber: Trip Event Logs That Break the State Machine Hard
- Uber: Which Promo Gets Credit for a Rider's First Trip Hard
- Walmart: Close-Then-Open Shifts With Under Ten Hours' Rest Medium
- Walmart: Each Store's Sales Gap to Its Region's Leader Medium
- Walmart: Walmart+ Membership Spells, Bridging Short Lapses Hard
- Walmart: Median Minutes From Shelf Gap to Refill by Department Hard
- Zomato: Best-Rated Dining Spot in Each Locality Medium
- Zomato: Reviews Far From the Restaurant's Consensus Medium
- Zomato: Blinkit Stock-Outs Lasting a Day or More Medium
- Zomato: Top Intercity Legends Dish in Each Destination City Medium
- Zomato: Live Menu Rebuilt From the Latest Approved Edits Hard
Strings
- Fix the Capitalisation of Registered Names Easy
- Students Registered for a Machine Learning Elective Easy
- Applicants With a Valid College E-mail Address Easy
- Canteen Items Sold on Each Day Easy
- Masked Card Numbers for Card Statements Easy
- Salary Credits by Employer From Statement Narrations Medium
- Top Two PSP Handles by Monthly UPI Volume Hard
- NGO Donors Grouped by Email Domain Easy
- Library Cards Expiring in March 2025 Easy
- Grievance Tickets per Ward From Reference Codes Medium
- B2B Invoices With a Malformed GSTIN Easy
- Masked Reviewer Names for Top Reviews Easy
- Learner Sign-ups by E-mail Domain Easy
- Faculty Names Formatted for ID Cards Easy
- Course Catalogue Summary by Department and Level Medium
- Masked Customer Phone Numbers on Rider Slips Easy
- Packing Slip Item List for Each Quick Order Medium
- Coupon Discount Spend by Campaign Prefix Medium
- Gamertags Breaking the Naming Policy Easy
- Email Domains Behind Unverified Sign-ups Medium
- Patient Mobile Numbers That Cannot Get SMS Reminders Easy
- Doctor Names for the Prescription Letterhead Easy
- Work E-mail Addresses for New Joiners Easy
- Staffing Pool of Multi-Skill Experts Medium
- Machine Count per Plant From Asset Tags Easy
- Incoming Lot Rejection Rate by Supplier Medium
- Machines With Repeating Fault Codes Medium
- Email Subject Lines Cut Off in the Inbox Preview Easy
- Sign-ups by UTM Source Read From Landing URLs Medium
- Active Fleet Vehicles by Registration State Easy
- Promo Campaign Redemptions and Discount Burn Medium
- Error Codes in the API Gateway Logs Easy
- Error Counts by Region and Environment From Hostnames Medium
- Masked Tenant Phone Numbers for the Notice Board Easy
- Parse Listing Titles Into Locality and BHK Medium
- Category Codes From SKU Prefixes Easy
- Duplicate Vendors After Cleaning Up Their Names Medium
- Signups by Work Email Domain Easy
- Signups and Upgrades by UTM Source Medium
- Handles Breaking the Username Policy Easy
- Sign-Ups by Email Provider Medium
- Most Common Leading Hashtags in Captions Medium
- Overseas Players in the Auction Pool by Role Easy
- Wickets Credited to Each Bowler From the Dismissal Text Medium
- Tracks With a Featured Artist Easy
- Playlist Length as Clock Time Medium
- Masked Mobile Numbers on Bill Statements Easy
- International Voice Call Share per Caller Medium
- Current Status Labels for Train PNRs Easy
- Hotel Loyalty Members per Email Domain Easy
- Connecting Itineraries per City Pair Medium
- Airbnb: Host Display Names With a Last Initial Easy
- Airbnb: Listings With a Kitchen but No Wi-Fi Medium
- Amazon: Search Queries Mentioning Each Brand Easy
- Apple: Trade-In Credit Paid by Device Family Easy
- Apple: Daily Share of Checked-In Devices on iOS 18 Medium
- Apple: AppleCare Serial Numbers That Fail the Format Check Medium
- Apple: Devices That Moved to an Older iOS Version Hard
- Dream11: Promo Code Redemptions per Campaign Easy
- Dream11: Multiple Accounts Behind One Gmail Address Medium
- Flipkart: Shopsy Reseller Store Handles Easy
- Google: Read Match Type From Ad Keyword Syntax Easy
- Google: Drive Files Shared Outside the Owner's Domain Medium
- Google: Places per Top-Level Maps Category Medium
- Hotstar: Playback Errors by App Platform Easy
- LinkedIn: Custom Profile URLs That Break the Rules Medium
- Meta: Threads Posts Cut Off in the Feed Preview Easy
- Meta: Messenger Call Drops by Major App Version Medium
- Meta: Trending Reels Tags Split Out of Comma-Separated Lists Hard
- Microsoft: Azure Resource Count per Resource Group From Resource IDs Easy
- Microsoft: Privileged Azure Role Holders for the Access Review Medium
- Myntra: Product Display Names From Brand, Colour and Article Easy
- Ola: Registration Plates Cleaned for the Compliance Upload Easy
- Ola: Scooters Behind Their Model's Newest Firmware Hard
- Paytm: Merchant QR Codes Still on the Old @paytm Handle Easy
- PhonePe: Masked UPI IDs on Payment Receipts Easy
- Razorpay: Fund Accounts With a Malformed UPI ID Easy
- Razorpay: Bank Credits That Match No Settlement Medium
- Spotify: URL Slugs for Podcast Show Names Easy
- Spotify: Featured-Artist Credits in Track Titles per Label Medium
- Swiggy: Saved Addresses Without a Valid Pincode Easy
- Swiggy: Genie Tasks Flagged by Blocked Keywords Medium
- Swiggy: Units Sold per Item From Instamart Combo Codes Hard
- Uber: Driver Names as Shown in the Rider App Easy
- Walmart: Supercenters per State From Store Codes Easy
- Walmart: Item Records Sharing a UPC After Cleanup Medium
- Walmart: Truck Routes Rebuilt From Store Geofence Pings Hard
- Zomato: Build the URL Slug of Every Restaurant Page Easy
Dates
- Daily Active Users in the 30 Days to 15 March Easy
- Days the Air Quality Got Worse Than the Day Before Easy
- UPI Payments by Month and City Medium
- Share of Customers Whose First Grocery Order Came Same Day Medium
- Fixed Deposits Maturing in March 2025 Easy
- UPI Success Rate by App and Month Medium
- Savings Accounts Below the Minimum Average Balance Hard
- UPI App New-User Retention in the Following Month Hard
- Grievances Resolved Within the Seven-Day SLA Medium
- Recurring Donors Across Three Months of 2024 Medium
- Monthly Library Issues by Genre Medium
- Marketplace Orders per Month in 2024 Easy
- Delivery SLA Breaches by Postal Zone Medium
- Customers Who Reordered Within 30 Days Medium
- Monthly Buyer Cohort Retention Hard
- Fee Invoices Paid Late or Still Overdue Easy
- Monthly Fee Collection by Payment Mode Medium
- Late Coursework Uploads and Average Hours Late per Course Medium
- Next-Month Retention of Learner Sign-up Cohorts Hard
- Weekend Food Orders in March 2024 Easy
- Peak-Hour Share of Orders by City Medium
- Rider Login Hours and July Incentive Tier Medium
- Next-Month Retention of First-Order Cohorts Hard
- Dark Store Daily Orders, Zero Days Included Hard
- Daily Active Players From the Login Log Easy
- Ranked Queue Wait Time by Hour of Day Medium
- Day-1 and Day-7 Retention by Signup Week Hard
- Medicine Batches Expiring Within 90 Days Easy
- Cashless Claims Settled per Insurer per Month Medium
- Peak Arrival Hour in Emergency Each Day Medium
- OPD New-Patient Retention by Monthly Cohort Hard
- Daily Admissions With Quiet Days and a Running Total Hard
- Work Anniversaries Coming Up in October 2025 Easy
- Employees Averaging Less Than Eight Hours a Day Medium
- Average Days to Fill a Requisition by Department Medium
- Monthly Attrition Rate in 2024 Medium
- 90- and 180-Day Retention of 2024 Hires by Quarter Hard
- Solar Plant Monthly Generation in 2024 Easy
- Machines With Over Two Hours of Unplanned Downtime Medium
- Late Work Order Rate by Line Medium
- EV Charging Peak and Off-Peak Revenue Medium
- Solar Daily Output With Missing Days Filled Hard
- Instagram Creator Deals Signed in Q3 2024 Easy
- Campaign Months That Overspent the Budget Medium
- Email Open Rate by Hour of Send Medium
- Weekly Leads by UTM Medium Medium
- Dark Days Inside Campaign Flight Dates Hard
- Late-Night Ride Requests for the May Safety Audit Easy
- Undelivered Shipments Past Their Promised Date Easy
- Monthly Completed Trips, GMV and Average Fare Medium
- Daily Sorting-Hub Backlog Including Days With None Hard
- Production Incidents Opened on a Weekend Easy
- First-Response SLA Breach Rate by Priority Medium
- Monthly Change Failure Rate of Production Deploys Medium
- Peak Ticket Hour for Each Day of the Week Medium
- Gaps in the On-Call Rota Hard
- Repeat Contact Rate by First-Ticket Month Hard
- Maintenance Tickets Breaching the Seven-Day SLA Easy
- Leases Ending Within the Next 30 Days Easy
- Monthly Rent Collection: On Time, Late and Unpaid Medium
- Occupied Flats on the First of Each Month Hard
- Six-Month Renter Retention by Move-In Cohort Hard
- Open Purchase Orders Past Their Promised Date Easy
- March POS Bills by Day of the Week Easy
- Cycle Count Shrinkage Value by Store and Month Medium
- Daily Stock Carried Forward From the Last Count Hard
- Free Trials Ending Within a Week Easy
- Monthly Signup Cohort Retention Hard
- Month-End MRR From Subscription Periods Hard
- Moderation Reports Filed on Weekends in March 2025 Easy
- First-Week Retention by Sign-Up Month Hard
- T20 League Fixtures Played on a Weekend in 2024 Easy
- Share of Seats Booked Two Weeks Early for Each Match Medium
- Fantasy App Signup Cohorts Retained Into the Next Month Hard
- Days Each Player Was Out Injured, Merging Overlapping Records Hard
- Subscriptions Renewing in the Next Seven Days Easy
- Monthly Active Viewers and Minutes per Viewer Medium
- Listeners With a Song on Repeat Medium
- Sign-Up Channels by First-Week Activation Medium
- Next-Month Viewing Retention of Streaming Sign-Up Cohorts Hard
- Daily Streams in an Album's First Week, Zero Days Included Hard
- Power Outages Lasting Four Hours or More Easy
- Prepaid Recharge Next-Month Retention by Cohort Hard
- Daily Network Drop Rate Including Silent Days Hard
- Nightly Rooms Sold Calendar for the Holiday Season Hard
- Airbnb: Friday and Saturday Check-Ins per City Easy
- Airbnb: Host Response Rate Within 24 Hours Medium
- Amazon: EC2 Billable Seconds With the One-Minute Minimum Easy
- Apple: AppleCare Claims Filed in a Device's First 30 Days Easy
- Dream11: Withdrawals That Missed the 24-Hour Payout Promise Easy
- Google: Chromebooks Not Synced in 90 Days Easy
- Meta: Marketplace Listings Sold Within a Day Easy
- Meta: Messenger Video Call Minutes by Day of the Week Easy
- Meta: Marketplace Listings Against the Same Month Last Year Medium
- Microsoft: Teams Meetings That Ran Past Their Booked Slot Easy
- Myntra: Delivered GMV by Indian Fiscal Year and Quarter Medium
- Ola: Scooters Due for Their First Free Service Easy
- Ola: Scooters Covered by a Care Plan on Each Month End Hard
- Ola: Service Tickets Breaching the 3-Working-Day SLA Hard
- Paytm: Tatkal Train Bookings Made in the First Five Minutes Easy
- PhonePe: Collect Requests Still Pending After Their Expiry Easy
- Razorpay: Normal-Speed Refunds That Took Over a Week Easy
- Razorpay: Diwali-Week Captured Volume Against Last Year's Diwali Week Hard
- Spotify: Student Plans Due for Re-Verification Easy
- Uber: Rider Cancellations That Earn a Late-Cancel Fee Easy
- Uber: Pickup ETA Accuracy by City Medium
- Walmart: Associate Shifts Clocked Over Ten Hours Easy
- Walmart: Late Store Deliveries by Day of the Week Medium
- Zomato: Hyperpure Invoices Paid Late or Still Overdue Easy
- Zomato: Restaurant Partner Anniversaries Falling in November Hard
- Zomato: Orders Placed While the Restaurant Was Closed Hard
Conditional Logic
- Is the Playing XI Combination Valid? Easy
- Count Deliveries in Every Time Band Medium
- Customers With a Return: Delivered vs Returned Value Medium
- Loan Applicants by Credit Score Band Easy
- Loan Book Asset Classification by Branch Medium
- Polling Booth Turnout Bands Easy
- Cash Donations and 80G Eligibility Easy
- Cart Shipping Fee and Amount Payable Easy
- Cart Abandonment Rate by Device Medium
- GST Split Into CGST, SGST and IGST by Seller Medium
- Exam Marks to University Grade Letters Easy
- Refund Due on Cancelled Food Orders Easy
- Food App Checkout Funnel, Step by Step Hard
- Battle Pass Progress Labels for Season 12 Easy
- New-Player Funnel From Install to First Purchase by Platform Hard
- Label Each Insurance Claim by How It Settled Easy
- Insurance Claim Funnel by Insurer Hard
- Appraisal Rating Mix by Department Medium
- Hiring Funnel for Each Open Requisition Medium
- Performance Bonus Payout for FY2024-25 Medium
- Dimensional Inspection: Pass, Rework or Scrap Easy
- Label Each Campaign by Its Monthly Budget Tier Easy
- Email Subscribers Who Open but Never Click Medium
- Click to Sign-up to Purchase Funnel per Campaign Hard
- Ride Request Outcome Mix: Rider, Driver or No Driver Easy
- Dispatch Offer Acceptance Rate per Driver Medium
- Parcel Delivery Funnel and First-Attempt Rate by City Hard
- Deployment Outcomes per Service Easy
- Label CSAT Survey Responses by Sentiment Easy
- Broker Commission by Deal Slab Easy
- Net Stock Change per SKU From the Movement Log Easy
- Store Stock-Out Rate From Daily Closing Stock Medium
- Workspace Seat Utilisation Status Easy
- Pricing Page A/B Test Conversion by Variant Medium
- Label Accounts Active, Dormant or Churned Easy
- Moderation Outcomes by Report Reason Medium
- Full-Time Results Board for the Football League Easy
- Death-Overs Economy From Ball-by-Ball Data Medium
- Short, Standard and Long Episodes Easy
- Free-Trial Conversion and Second-Month Funnel Hard
- Slab Tariff Energy Charges Medium
- Monthly Recharge Revenue by Pack Type Medium
- Loyalty Tier Headcount From Points Balance Easy
- On-Time Arrival Performance by Airline Medium
- Hotel Cancellation Refunds Under a Tiered Policy Medium
- Apple: iCloud Accounts Using More Than Their Plan Easy
- Apple: Developer Proceeds After Commission in March 2025 Medium
- Dream11: Contest Entries by Format for Each Match Medium
- Google: Gmail Spam Filter Precision and Recall per Model Medium
- Hotstar: Commentary Language Split per Match Medium
- Hotstar: Unsold Ad Slots by Innings Phase Medium
- Hotstar: Stage Times of Slow Highlights Clips Hard
- Meta: Going and Interested Counts per Facebook Event Easy
- Meta: WhatsApp Business Message Delivery Funnel Medium
- Microsoft: Azure Subscription Budget Status This Month Easy
- Myntra: Insider Points Earned on Each Delivered Order Easy
- Myntra: The Best Price Box for Each Style Across Three Offers Hard
- Ola: Rentals Bill With Extra Kilometres and Minutes Medium
- Ola: Auto, Mini and Prime Ride Mix in Each City Medium
- Paytm: Flight Cancellation Refunds Under the Free Window Medium
- PhonePe: Labelling Scratch Card Rewards for the Rewards Page Easy
- PhonePe: Monthly P2P Versus P2M Payment Value in 2024 Medium
- PhonePe: Rewards Campaign Redemption Report on 1 April Medium
- Swiggy: Genie Fare by Distance Slab Easy
- Uber: Surge Share of Bengaluru Trips by Hour of Day Medium
- Zomato: Table Reservation No-Show Rate by Meal Slot Medium
New to SQL? Read the DBMS notes first, or test yourself with the SQL skill test.
How it works
- Read the tables. Each problem shows its schema and an example dataset with the result your query should return.
- Write and run. Write one MySQL SELECT in the editor and run it on the examples to see your result next to the expected one.
- Submit. A submission runs on every hidden dataset. If a dataset fails, you see its tables, the expected result and yours.
Who it is for
Students preparing for placement SQL rounds and data or backend interviews, and anyone who learnt SQL from a book and wants to write real queries.