mysql中想知道group by 之后的结果数量,必须用子查询吗?请举个例子

如题所述

第1个回答  2019-12-04
不一定。
select
id,sum(value)
from
TABLE
group
by
id
having
sum(value)
>
100
如例子中使用having就可以查询出合计大于100的结果
相似回答
大家正在搜