Question 21
What is the essential difference between WHERE and HAVING clauses in an SQL query?
All three statements (A, B, and C) accurately describe the distinctions between WHERE and HAVING in SQL syntax and query execution order.
What is the essential difference between WHERE and HAVING clauses in an SQL query?
All three statements (A, B, and C) accurately describe the distinctions between WHERE and HAVING in SQL syntax and query execution order.
Which of the following is NOT a built-in SQL standard aggregate function?
Standard SQL aggregate functions operate over multiple rows to return a single summarized scalar value: COUNT, SUM, AVG, MIN, MAX. CONCAT() is a scalar string manipulation function.
What does the SQL expression COUNT(*) return?
COUNT(*) counts all qualifying rows regardless of NULLs, whereas COUNT(column_name) ignores NULL entries in that specific column.
How does the aggregate function AVG(Salary) handle NULL values present in the Salary column?
All SQL aggregate functions (except COUNT(*)) implicitly ignore NULL values during calculation, averaging only over non-null values.
Which keyword is used in a SELECT statement to eliminate duplicate rows from the query result set?
The DISTINCT keyword forces the database engine to eliminate duplicate rows from the projection result.