Concept: In SQL, aggregate functions such as:
SUM()COUNT()AVG()MAX()MIN()are used to perform calculations on a set of rows and return a single result.
To filter results based on aggregate values, SQL uses the HAVING clause.
Step 1: Understand the WHERE clause.
The WHERE clause filters rows before grouping takes place.
Example:
SELECT * FROM Employees WHERE Salary > 50000;
It cannot be used with aggregate functions directly.
Step 2: Understand the HAVING clause.
The HAVING clause is used to filter results after aggregation.
Example:
SELECT Department, COUNT(*)
FROM Employees
GROUP BY Department
HAVING COUNT(*) > 5;
This query returns only those departments having more than 5 employees.
Step 3: Conclusion.
Since filtering conditions applied to aggregate functions are handled using the HAVING clause, the correct answer is:
HAVING
Match List-I with List-II:
| List-I (Personalities/Public Figures) | List-II (Bodies/Institutions) | ||
|---|---|---|---|
| (A) | Sanjay Malhotra | (I) | National Human Rights Commission |
| (B) | Om Prakash Rawat | (IV) | Election Commission of India |
| (C) | Justice V. Ramasubramanian | (III) | Supreme Court of India |
| (D) | Justice Deepak Misra | (II) | Reserve Bank of India |