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;