sql函数,select count(A.abc) as sum from A left join B on A.id=B.id where A.abc='1' group by A.abc
3个回答
2013-03-29
展开全部
SELECT
SUM ( t.iSum ) as sum
FROM
(
select count(A.abc) as iSum from A left join B on A.id=B.id where A.abc='1' group by A.abc
);
或者
select count(A.abc) as sum from A left join B on A.id=B.id where A.abc='1'
SUM ( t.iSum ) as sum
FROM
(
select count(A.abc) as iSum from A left join B on A.id=B.id where A.abc='1' group by A.abc
);
或者
select count(A.abc) as sum from A left join B on A.id=B.id where A.abc='1'
展开全部
去掉group by就是总数了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
select count(A.abc) as sum from A left join B on A.id=B.id where A.abc='1'
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询