尝试通过子查询
select count (distinct vid) as SUM_OF_SEC ,(select sum (amount*paidperitem) from pdalis where pid = 501 ;) AS SUM_OF_A , (select sum(amount * paidperitem) from pdalis where pid IN (500,504);) as SUM_OF_P from pdalis where pid in(500,504);
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)