Firstly usage of group by in select statement is to get the content by reference with one column like.
Select max(esal) from emp group by dept;.
Then it gives us the max salary in department wise, We may have many employees are working in a department so we can organize it in department wise, by this we can get only the particular department details although we have the duplicate values in salary, so we get consistent data.