select count(*) from 表名 group by 字段
select 字段, 函数(*) from 表名 group by 字段
--group by和havingy需要配合使用
--group by后边如果有过滤条件不能使用where
select company 公司, count(*) 数量 from 表名 group by company having(*) > 3
select * from goods order by price desc limit 3
select count(*) from 表名 group by 字段
select 字段, 函数(*) from 表名 group by 字段
--group by和havingy需要配合使用
--group by后边如果有过滤条件不能使用where
select company 公司, count(*) 数量 from 表名 group by company having(*) > 3
select * from goods order by price desc limit 3