← 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?
- A.4
- B.3
- C.1
- 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 →