Bird
0
0

Which clause is used to filter groups based on aggregate values in SQL?

easy📝 Conceptual Q2 of 15
SQL - GROUP BY and HAVING

Which clause is used to filter groups based on aggregate values in SQL?

AGROUP BY
BWHERE
CORDER BY
DHAVING
Step-by-Step Solution
Solution:
  1. Step 1: Identify filtering clauses

    WHERE filters individual rows, HAVING filters groups after aggregation.
  2. Step 2: Confirm HAVING filters on aggregate values

    HAVING can use aggregate functions like SUM, COUNT to filter groups.
  3. Final Answer:

    HAVING -> Option D
  4. Quick Check:

    Filter groups by aggregate = A [OK]
Quick Trick: Use HAVING to filter groups after aggregation [OK]
Common Mistakes:
MISTAKES
  • Using WHERE to filter aggregated groups
  • Confusing GROUP BY as a filtering clause

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes