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

  • Aggregating data
  • Filtering data
  • Joining tables
  • Sorting data
The purpose of the GROUP BY clause in SQL queries is to aggregate data based on specified columns. It is used in conjunction with aggregate functions such as COUNT, SUM, AVG, etc., to group rows that have the same values in specified columns. This allows for summarizing data and performing calculations on grouped data sets.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *