What is the purpose of the 'GROUP BY' clause in SQL?
A
Create a new table
B
Sort data alphabetically
C
Delete duplicate rows
D
Group rows sharing a property for aggregate functions
Correct Answer: Option D — Group rows sharing a property for aggregate functions
Explanation:
The GROUP BY clause in SQL groups rows that share a common value in specified columns, allowing aggregate functions such as COUNT, SUM, or A...
The GROUP BY clause in SQL groups rows that share a common value in specified columns, allowing aggregate functions such as COUNT, SUM, or AVG to be applied to each group separately. It is essential for summarizing data.