如何在选择SQL中合并SUM和COUNT

时间:2016-05-05 17:56:08

标签: sql select count group-by sum

我想在SQL中合并sum和count

select sum(A),B from TableA
group by B 
having c>3

select Count(A),B from TableA
group by B 
having c>3

选择1和选择2的结果是多个记录 我怎么能在一个选择上有这样的东西?

sum(A)*count(A) 

1 个答案:

答案 0 :(得分:0)

这样的东西?

jps