SQL GROUP BY 語句
sql group by 語句
group by 語句用于結合聚合函數,根據一個或多個列對結果集進行分組。
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;