← Quiz: GROUP BY and HAVING: all 10 questions
Quiz: GROUP BY and HAVING · Question 7 of 10
SELECT deptid FROM employees GROUP BY deptid on the company table returns how many rows?
SELECT dept_id FROM employees GROUP BY dept_id on the company table returns how many rows?
- A.3
- B.7
- C.4
- D.6
Answer & explanation
Correct answer: 4
Groups 10, 20 and 30, plus one group for NULL (Arjun) — NULLs form their own group.
Can you get the rest right without peeking?
Take the timed Quiz: GROUP BY and HAVING quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →