unnested
Pro

© 2026 unnested

Built for learners, by learners

AboutPrivacy PolicyTerms of ServiceContactSuggest a feature
Learn SQL

Window Functions

Pro

24 questions

Unlock all 24 questions with a Pro subscription.

Upgrade to Pro
OutputEasy
PARTITION BY: does the counter reset per group?
OutputEasy
ROW_NUMBER: what order determines the rank?
OutputMedium
RANK vs ROW_NUMBER on ties
OutputMedium
DENSE_RANK on ties: what comes after two 1s?
OutputMedium
SUM with an empty OVER clause: how many rows collapse?
OutputMedium
ORDER BY inside OVER: does SUM accumulate?
OutputMedium
NTILE: which bucket does each row land in?
OutputMedium
LAG with offset > 1
Multiple choiceMedium
Multiple window functions in one query
Multiple choiceMedium
Window function vs GROUP BY
OutputMedium
NTILE with uneven bucket sizes
Multiple choiceMedium
Can you mix window functions and GROUP BY?
Multiple choiceMedium
Named windows with the WINDOW clause
VocabularyMedium
What does PARTITION BY do in a window function?
OutputHard
LAG: which row does it look back to?
OutputHard
Top-N per group with window functions
OutputHard
PERCENT_RANK: which direction puts Alice at 0.0?
Multiple choiceHard
NULLs in window ORDER BY
Multiple choiceHard
Frame clauses: how many rows does 1 PRECEDING cover?
OutputHard
FIRST_VALUE: same anchor row for every row?
Multiple choiceHard
Why LAST_VALUE surprises developers
Multiple choiceHard
Top-N per group: why a subquery is needed
Multiple choiceHard
ROWS vs RANGE frame modes
VocabularyHard
What is a window frame?