In SQL, which clause is used to filter rows before grouping? MCQ with Answer and Explanation

In SQL, which clause is used to filter rows before grouping?
A. ORDER BY
B. HAVING
C. GROUP BY
D. WHERE
Answer: Option D
Solution (By JKSSB Mock Tests)
WHERE is used to filter individual rows before aggregation and grouping.

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1
Which type of relationship is represented by a foreign key in a relational database?
A. One-to-many
B. All of the above
C. Many-to-many
D. One-to-one

Correct Answer: Option B


Explanation:
Foreign keys can represent various relationships, including one-to-one, one-to-many, and many-to-many (via junction tables).

This question belongs to: Computer Database Management System (DBMS)
Question #2
The actual collection of data tuples stored in a table at any specific point in time is called a what?
A. Relation Domain
B. Relation Schema
C. Relation Degree
D. Relation Instance

Correct Answer: Option D


Explanation:
A Relation Instance is the specific collection of data rows (tuples) present in a table at a given moment. It changes frequently as data is modified.

This question belongs to: Computer Database Management System (DBMS)
Question #3
In SQL, what does the wildcard '%' match when used with LIKE?
A. Only digits
B. Any single character
C. A specific character
D. Any string of zero or more characters

Correct Answer: Option D


Explanation:
'%' matches any sequence of zero or more characters, while '_' matches a single character.

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