Skip to content

All company names, logos, and trademarks are the property of their respective owners. Their use is for identification purposes only and does not imply endorsement.

LDS SQL Window Functions 3030 Curated SQL Problems

A 6-stage progression through ROW_NUMBER, RANK, LAG, running totals, moving averages, Top-N per partition, and NTILE bucketing — composed across 15 production-grade schemas. The pattern that separates intermediate from senior SQL candidates in onsite rounds, and the one most people can fake their way around until they can't.

Problems included in LDS SQL Window Functions 30

  1. Guest Booking Sequence Number
  2. Customer Order Sequence Number
  3. Customer Order Sequence Number
  4. Customer Charge Sequence Number
  5. Number Posts per User Chronologically
  6. Rank Accounts by Balance Within Account Type
  7. Rank Portfolios by Value Per User
  8. Rank Properties by Total Revenue
  9. Rank Carriers by Shipment Volume
  10. Provider Claim Rank Within Specialty
  11. Order Value Change From Prior Order
  12. Fare Change From Previous Trip
  13. Charge Amount Change From Previous
  14. Time Gap Between Consecutive Messages
  15. Bill Amount Change From Previous Month
  16. Cumulative Principal Paid per Loan
  17. Trade Running Total Per Portfolio
  18. Invoice Amount 3-Period Moving Average
  19. Price Change 3-Event Moving Average
  20. Campaign CTR With 7-Day Moving Avg
  21. Top 2 Expensive Clicks per Campaign
  22. Top Two Transactions per Customer by Amount
  23. Most Expensive Listing per City
  24. Top Product per Category by Revenue
  25. Top Title per Genre by Rating
  26. Shipment Weight Quartile Analysis
  27. Listing Price Quartile Analysis
  28. Organization Usage Quartile Analysis
  29. User Watch Time Quartile Analysis
  30. User Engagement Quartile Analysis