engineering computer science MCQ #695

What is the purpose of the GROUP BY clause in SQL?

engineering computer science MCQ #695

  1. Question 1

    Q1. What is the purpose of the GROUP BY clause in SQL?

    • A) To filter data based on conditions
    • B) To sort data in ascending order
    • C) To group data based on one or more columns
    • D) To join two tables

    Answer: To group data based on one or more columns

    Explanation: The GROUP BY clause groups data based on one or more columns, allowing aggregate functions to be applied to each group.