Discussion
Which SQL clause filters records after grouping ?
Answer: D
The clause is HAVING.
A query is evaluated in the order FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY. HAVING applies a condition to each group after GROUP BY has formed it, and can therefore use aggregates, as in HAVING COUNT(*) > 5.
WHERE filters individual rows before grouping and cannot use aggregates. GROUP BY forms the groups but does not filter them. ORDER BY only sorts the result.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development