← All topics
Quiz: Window Frames: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What does the frame ROWS BETWEEN 2 PRECEDING AND CURRENT ROW include?
- Q2. 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?
- Q3. With ORDER BY and no frame clause, what is the default frame?
- Q4. Why does LASTVALUE(x) OVER (ORDER BY d) often return just the current row's x?
- Q5. Scores are 70, 80, 80, 90. A RANGE running SUM ordered by score gives what for each of the two 80s?
- Q6. 10 rows are split with NTILE(4). What are the bucket sizes?
- Q7. For the lowest value in a set of rows, PERCENTRANK is always:
- Q8. Which frame gives a "centred" 3-row window?
- Q9. What does the WINDOW clause do?
- Q10. 7 students, marks all different. Kabir has the 4th lowest marks. What is his CUMEDIST?