Introduction to Group by Clause

9/14/2020 6:48:58 AM

Introduction to Group by Clause: To arrange identical data in groups. Used with the select query, group by must always follow the where clause and must precede the order by clause. Now given bellow the example code:

select Salary.Gendar, count(*) from Salary group by Salary.Gendar

In this case I have Salary table then I use the group by clause on the Gender column to find out how many people count by their gender.