我可以用聚合函数编写两种查询:
select team, count(min) as min_count
from table
group by team
having count(min) > 500
或者select *
from (
select team, count(min) as min_count
from table
group by team
) as A
where A.min_count > 500
这两种方法是否有性能上的优劣之分,或者它们在功能上是相同的?