engineering computer science MCQ #754

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

engineering computer science MCQ #754

  1. Question 1

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

    • A) To filter data
    • B) To sort data
    • C) To group data by one or more columns
    • D) To join tables

    Answer: To group data by one or more columns

    Explanation: The 'GROUP BY' clause groups data by one or more columns, allowing aggregate functions like SUM, AVG, and COUNT to be applied to each group.