Which clause is used in a SQL SELECT statement to organize matching rows into summary groups based on one or more columns? MCQ with Answer and Explanation

Which clause is used in a SQL SELECT statement to organize matching rows into summary groups based on one or more columns?
A. ORDER BY
B. HAVING
C. SORT BY
D. GROUP BY
Answer: Option D
Solution (By JKSSB Mock Tests)
The GROUP BY clause groups rows that have the same values into summary rows, often used alongside aggregate functions like COUNT(), MAX(), or AVG().

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1
Which property of a DBMS ensures that all operations within a transaction are completed successfully, or none of them are executed at all?
A. Atomicity
B. Consistency
C. Isolation
D. Durability

Correct Answer: Option A


Explanation:
Atomicity follows the 'all-or-nothing' rule, ensuring that a transaction is either fully committed or completely rolled back if an error occurs.

This question belongs to: Computer Database Management System (DBMS)
Question #2
Which of the following is a DML statement?
A. CREATE
B. UPDATE
C. ALTER
D. DROP

Correct Answer: Option B


Explanation:
UPDATE is a Data Manipulation Language (DML) command used to modify existing records in a table. CREATE, ALTER, DROP are DDL.

This question belongs to: Computer Database Management System (DBMS)
Question #3
Which of the following is a valid SQL data type for storing large binary data?
A. CHAR
B. TEXT
C. BLOB
D. VARCHAR

Correct Answer: Option C


Explanation:
BLOB (Binary Large Object) is used for storing large binary data, such as images or files.

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