🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

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