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 30 — 30 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
- Guest Booking Sequence Number
- Customer Order Sequence Number
- Customer Order Sequence Number
- Customer Charge Sequence Number
- Number Posts per User Chronologically
- Rank Accounts by Balance Within Account Type
- Rank Portfolios by Value Per User
- Rank Properties by Total Revenue
- Rank Carriers by Shipment Volume
- Provider Claim Rank Within Specialty
- Order Value Change From Prior Order
- Fare Change From Previous Trip
- Charge Amount Change From Previous
- Time Gap Between Consecutive Messages
- Bill Amount Change From Previous Month
- Cumulative Principal Paid per Loan
- Trade Running Total Per Portfolio
- Invoice Amount 3-Period Moving Average
- Price Change 3-Event Moving Average
- Campaign CTR With 7-Day Moving Avg
- Top 2 Expensive Clicks per Campaign
- Top Two Transactions per Customer by Amount
- Most Expensive Listing per City
- Top Product per Category by Revenue
- Top Title per Genre by Rating
- Shipment Weight Quartile Analysis
- Listing Price Quartile Analysis
- Organization Usage Quartile Analysis
- User Watch Time Quartile Analysis
- User Engagement Quartile Analysis