Skills101
← All practice quizzes

Quiz: GROUP BY and HAVING

5 questionsNo time limitPass: 60%+10 XP on first pass

COUNT, SUM, AVG, MIN and MAX, grouping rows with GROUP BY, filtering groups with HAVING, WHERE vs HAVING, and the order SQL actually runs a query in.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    Which clause filters GROUPS using an aggregate like COUNT(*) > 3?

  2. Question 2

    A column has values 10, NULL, 20. What is COUNT(column)?

  3. Question 3

    In which order does SQL logically process these?

  4. Question 4

    A column has values 10, NULL, 20. What is AVG(column)?

  5. Question 5

    Why is SELECT name, COUNT(*) FROM employees GROUP BY dept_id invalid in standard SQL?