DA0-001 · Question #327
DA0-001 Question #327: Real Exam Question with Answer & Explanation
The correct answer is B: HAVING. In a relational database management system, the WHERE clause filters individual rows before any grouping occurs, while the HAVING clause filters groups of rows based on aggregate functions. Both are used to restrict the data returned by a query.
Question
Which of the following query statements would be used when filtering data in a relational database management system? (Choose two.)
Options
- AORDER BY
- BHAVING
- CWHERE
- DSELECT
- EINSERT
- FGROUP BY
Explanation
In a relational database management system, the WHERE clause filters individual rows before any grouping occurs, while the HAVING clause filters groups of rows based on aggregate functions. Both are used to restrict the data returned by a query.
Common mistakes.
- A. ORDER BY is used for sorting the result set, not for filtering which rows are included.
- D. SELECT is used for specifying which columns to retrieve from a table, not for filtering rows.
- E. INSERT is a Data Manipulation Language (DML) statement used to add new rows to a table, not for filtering existing data.
- F. GROUP BY is used to group rows that have the same values in specified columns into summary rows, not for filtering rows based on conditions.
Concept tested. SQL data filtering clauses
Reference. https://learn.microsoft.com/en-us/sql/t-sql/queries/where-transact-sql?view=sql-server-ver16
Topics
Community Discussion
No community discussion yet for this question.