Group by query is used to group the records on some basis
(eg. you need to group the employee records on country basis means all employee belonging to same country comes in one group).
to write the group by query group by clause is used
.
- and for grouing the resule, there must by aggregate function is to be used in select clause.
like Sum(), count(),avg() etc..