问题描述
解决方案
SELECT 表名.* from 表名,
(select avg(total) t,region from 表名 group by region) ta
where 表名.region=ta.region and 表名.total>ta.t
解决方案二:
select total from 表名 group by region having total>agv(total)
解决方案三:
select total from 表名 group by region having total>avg(total)
时间: 2024-10-16 05:34:22