Grouping Rows With Same Values In Specified Columns
SELECTcol1_name,SUM(col2_name)FROMtable_nameGROUPBYcol1_name;-- `GROUP BY` is used with aggregate functions to perform calculations on the grouped data
-- every column in the SELECT clause must either be listed in the GROUP BY clause or be used within an aggregate function
SELECTcolumn1,column2,AVG(column3)FROMtable_nameGROUPBYcolumn1,column2;-- can `GROUP BY` multiple cols