🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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 →
  1. Q1. What does the frame ROWS BETWEEN 2 PRECEDING AND CURRENT ROW include?
  2. 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?
  3. Q3. With ORDER BY and no frame clause, what is the default frame?
  4. Q4. Why does LASTVALUE(x) OVER (ORDER BY d) often return just the current row's x?
  5. Q5. Scores are 70, 80, 80, 90. A RANGE running SUM ordered by score gives what for each of the two 80s?
  6. Q6. 10 rows are split with NTILE(4). What are the bucket sizes?
  7. Q7. For the lowest value in a set of rows, PERCENTRANK is always:
  8. Q8. Which frame gives a "centred" 3-row window?
  9. Q9. What does the WINDOW clause do?
  10. Q10. 7 students, marks all different. Kabir has the 4th lowest marks. What is his CUMEDIST?