Menu▾

Interview pack

Window functions deep-dive

The window-function questions in the bank, back to back — ranking, running totals, LAG/LEAD and NTILE, the topic that trips up the most candidates.

hardRunning total of daily salesFree→hardPrevious month's revenueFree→hardSecond most expensive product per categoryFree→hardRank customers by spendBasic→hardRank customers by transaction amount, per branchBasic→hardDrivers delayed 3+ days in a rowBasic→hardMonth-over-month change in units soldBasic→hardDay-over-day change in order volumeBasic→hardSplit customers into spending quartilesBasic→hardBusiest data center in each regionBasic→

Company names are trademarks of their respective owners, used here only to describe practice material. mahir_data is not affiliated with, endorsed by, or sponsored by any company named on this site. Terms.