What is the purpose of the SQL 'GROUP BY' clause? MCQ with Answer and Explanation

What is the purpose of the SQL 'GROUP BY' clause?
A. To filter rows
B. To join tables
C. To group rows that have the same values in specified columns into summary rows
D. To sort the result set
Answer: Option C
Solution (By JKSSB Mock Tests)
GROUP BY organizes data into groups based on the values of one or more columns, often used with aggregate functions.

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1
What is the purpose of the SAVEPOINT statement?
A. To permanently save changes
B. To release locks
C. To start a new transaction
D. To create a point within a transaction to which you can later roll back

Correct Answer: Option D


Explanation:
SAVEPOINT creates a named point within a transaction, allowing partial rollback to that point without affecting the entire transaction.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What is a stored procedure?
A. A view
B. A trigger
C. A set of precompiled SQL statements that can be executed as a single unit
D. An index

Correct Answer: Option C


Explanation:
A stored procedure is a named collection of SQL statements and logic stored in the database, which can be invoked by applications.

This question belongs to: Computer Database Management System (DBMS)
Question #3
Which of the following terms refers to the duplication of data across multiple locations in a non-DBMS file system?
A. Data Redundancy
B. Data Integrity
C. Data Security
D. Data Isolation

Correct Answer: Option A


Explanation:
Data Redundancy refers to the unnecessary duplication of the exact same data in multiple files or locations, which wastes storage and can cause inconsistencies.

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