Which clause must be used instead of WHERE to filter or restrict rows after an aggregation or group-by operation has been performed? MCQ with Answer and Explanation

Which clause must be used instead of WHERE to filter or restrict rows after an aggregation or group-by operation has been performed?
A. RESTRICT
B. WHEN
C. HAVING
D. WHERE CURRENT OF
Answer: Option C
Solution (By JKSSB Mock Tests)
The HAVING clause was added to SQL because the WHERE keyword cannot be applied to aggregate functions; it filters groups generated by the GROUP BY clause.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Database Management System (DBMS) Questions

Question #1
Which of the following is a characteristic of the relational model?
A. Data is accessed via SQL
B. All of the above
C. Data is stored in tables
D. Relationships are represented through keys

Correct Answer: Option B


Explanation:
The relational model organizes data in tables, uses keys for relationships, and is queried using a language like SQL.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What is a candidate key?
A. A set of columns that uniquely identifies a row and can serve as a primary key
B. A foreign key
C. A column that allows duplicate values
D. A column that can be used as a primary key but is not chosen

Correct Answer: Option A


Explanation:
A candidate key is an attribute or set of attributes that can uniquely identify a tuple; one is selected as the primary key.

This question belongs to: Computer Database Management System (DBMS)
Question #3
The total number of tuples (rows) contained within a relational database table is called its what?
A. Dimension
B. Cardinality
C. Degree
D. Density

Correct Answer: Option B


Explanation:
The number of tuples or rows in a relation is defined as the cardinality of that relation.

This question belongs to: Computer Database Management System (DBMS)