Founding rate: RM5 off Basic, forever — applied automatically. See pricing

Menu

Topic

Window functions

Ranking, running totals, and comparing a row to its neighbours without collapsing the result set. This is the topic that most often separates a mid-level candidate from a junior one, and PARTITION BY is where it goes wrong.

New to this? Read the Window functions chapter.Prefer a fixed order? Window functions deep-dive.

easyRank grocery items by price within each categoryFreeeasyShow each customer's previous purchase amountFreeeasyShow every top-up next to the overall averageFreemediumNumber each subscriber's reloads in orderFreemediumRunning balance for each e-walletFreehardBusiest data center in each regionBasichardDay-over-day change in order volumeBasichardDrivers delayed 3+ days in a rowBasichardMonth-over-month change in units soldBasichardPrevious month's revenueFreehardRank customers by spendBasichardRank customers by transaction amount, per branchBasichardRank projects by margin within each practiceBasichardRunning total of daily salesFreehardSecond most expensive product per categoryFreehardShow each customer's previous tier alongside their new oneBasichardSplit customers into spending quartilesBasic