🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Window Functions: all 10 questions

Quiz: Window Functions · Question 8 of 10

How many rows does SELECT name, AVG(salary) OVER (PARTITION BY deptid) FROM employees return for the 7 employees?

How many rows does SELECT name, AVG(salary) OVER (PARTITION BY dept_id) FROM employees return for the 7 employees?

  1. A.4
  2. B.3
  3. C.1
  4. D.7
Answer & explanation

Correct answer: 7

Window functions keep every row; GROUP BY would collapse them.

Can you get the rest right without peeking?

Take the timed Quiz: Window Functions quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →