GROUP BY clause, allowing you to filter groups based on a specified condition. Unlike the WHERE clause, which is used to filter rows before they are grouped, the HAVING clause is applied to each group of grouped data.SQL Group Filtering: SQL provides different clauses for filtering data at different stages of query execution.
Key Differences:
Example Demonstration:
SELECT department, AVG(salary) FROM employees GROUP BY department HAVING AVG(salary) > 50000; ← Filters after grouping
Why HAVING is correct:
The correct answer is (2) having, as it's the only clause that applies conditions after groups are formed.
On a relation named Loan of a bank: 


What comes next in the series?
\(2, 6, 12, 20, 30, \ ?\)
Rearrange the following parts to form a meaningful and grammatically correct sentence:
P. that maintaining a positive attitude
Q. even in difficult situations
R. is essential for success
S. and helps overcome obstacles effectively
Rearrange the following parts to form a meaningful and grammatically correct sentence:
P. a healthy diet and regular exercise
Q. are important habits
R. that help maintain good physical and mental health
S. especially in today's busy world