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.
| emp1 | |
| Id | Name |
| 1 | Amit |
| 2 | Punita |
| emp2 | |
| Id | Name |
| 1 | Punita |
| 2 | Anand |
Select the statements that are CORRECT regarding patterns of biodiversity.
Which of the following hormone is not produced by placenta ?
List - I | List - II | ||
| A | Streptokinase | I | Blood-Cholestrol lowering agents |
| B | Cyclosporin | II | Clot Buster |
| C | Statins | III | Propionibacterium sharmanii |
| D | Swiss Cheese | IV | Immuno suppressive agent |
Which of the following option determines percolation and water holding capacity of soils ?