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
Find the least upper bound and greatest lower bound of \( S = \{X, Y, Z\} \) if they exist, of the poset whose Hasse diagram is shown below:
Suppose \( D_1 = (S_1, \Sigma, q_1, F_1, \delta_1) \) and \( D_2 = (S_2, \Sigma, q_2, F_2, \delta_2) \) are finite automata accepting languages \( L_1 \) and \( L_2 \), respectively. Then, which of the following languages will also be accepted by the finite automata:
(A) \( L_1 \cup L_2 \)
(B) \( L_1 \cap L_2 \)
(C) \( L_1 - L_2 \)
(D) \( L_2 - L_1 \)
Choose the correct answer from the options given below: