
select a.name from class a left join
( select name from class where fenshu < 80 ) b on a.name = b.name where b.name is null group by a.name
( select name from class where fenshu < 80 ) b on a.name = b.name where b.name is null group by a.name
select t1.name from
(select name ,count(*) n from class where fenshu>=80 group by name ) t1
,(select name ,count(*) n from class group by name) t2
where t1.name=t2.name and t1.n=t2.n
select * from ( select * from (select * from class order by fenshu asc ) temp group by name ) tem
where tem.fenshu > 80
select name , min(fenshu) from class group by name HAVING min(fenshu)>80
本文深入探讨了SQL查询中高级数据聚合与过滤技术,包括分组查询、多条件筛选、子查询应用等核心概念。通过具体示例展示了如何使用GROUP BY、HAVING、JOIN等操作符高效地处理大数据集,实现复杂的数据分析与提取。
7794

被折叠的 条评论
为什么被折叠?



