Skills101
← All practice quizzes

Quiz: Window Frames

5 questions · new set on every retakeNo time limitPass: 60%+10 XP on first pass

Go beyond ROW_NUMBER and running totals. Control exactly which rows a window function sees with ROWS BETWEEN, build moving averages, avoid the LAST_VALUE trap, and split rows into groups with NTILE.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    What does the frame ROWS BETWEEN 2 PRECEDING AND CURRENT ROW include?

  2. Question 2

    Amounts in order are 10, 20, 30, 40. What is the 3-row moving average (2 PRECEDING to CURRENT ROW) on the row with 40?

  3. Question 3

    With ORDER BY and no frame clause, what is the default frame?

  4. Question 4

    Why does LAST_VALUE(x) OVER (ORDER BY d) often return just the current row's x?

  5. Question 5

    Scores are 70, 80, 80, 90. A RANGE running SUM ordered by score gives what for each of the two 80s?

🎯 Today’s placement challenge — 10 questions, no login. Can you score 10/10?Take today’s challenge →