Databases & SQL vocabulary · SQL Statements and Queries

GROUP BY

Meaning in databases & SQL, with examples

phraseCore term

In databases & SQL, GROUP BY means: The SQL clause that puts rows with the same values into groups so that a total, count or average can be calculated for each group.

In Turkish: gruplama, GROUP BY ifadesi

How it is used

Used with aggregate functions: SELECT city, COUNT(*) FROM customers GROUP BY city. In standard SQL every selected column that is not inside an aggregate function must appear in GROUP BY; breaking this rule is one of the most common SQL errors.

Example sentences

  1. Group by month to see how revenue changed over the year.

  2. The query fails because product_name is in the SELECT list but not in the GROUP BY.

Common collocations

  • GROUP BY a column
  • group by date
  • GROUP BY with HAVING
  • grouped results

This word in other fields

The same English word can have a different meaning in another field:

More terms: SQL Statements and Queries

Practise with graded reading

Reading at the right level is the fastest way to make new words stick. Pick free English books by level: