What is the use of group by clause?
Group by clause is used to be relevant aggregate functions to a set of tuples. The attributes given in the group by clause are used to shape groups. Tuples with the similar value on all attributes in the group by clause are placed in one group.