GROUP BY
Meaning in software engineering, with examples
In software engineering, 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
Group by month to see how revenue changed over the year.
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
Related terms
This word in other fields
The same English word can have a different meaning in another field:
More terms: Databases and Persistence
Practise with graded reading
Reading at the right level is the fastest way to make new words stick. Pick free English books by level:
