group by clause in ms sql
/*Group by clause is used to group a selected set of rows into a set of summary rows by the values of one or more column or expression. It is always used in Conjunction with one or more aggregate function.*/ SELECT AGGREGATE_FUNCTION(Column_Name) FROM Table_Name /*Group by exmaple*/ SELECT city, sum(Salary) as TotalSalary FROM tblEmployee GROUP BY City