select
distinct
A.number
from
(select
number
from grade
group by number
having count(number)>=3
) A
order by A.number
本题思路:
1.首先使用group by对number分组聚合;
2.用count对分组聚合后的number列输出每组个数;
3.形成以上新表格后,对number使用distinct去重,然后order by升序排序。
(注意审题查询结果只有number列)