SQL GROUP BY 語句
sql group by 語句
group by 語句用于結(jié)合聚合函數(shù),根據(jù)一個(gè)或多個(gè)列對結(jié)果集進(jìn)行分組。
1. group by 語法
select column_name, aggregate_function(column_name)
from table_name
where column_name operator value
group by column_name;
from table_name
where column_name operator value
group by column_name;