4,816
社区成员
发帖
与我相关
我的任务
分享
Select a.某字段, Sum(a.F1) as F1,Sum(a.F2) as F2 From
(
Select 某字段,Sum(金额) as F1,0 as F2 From table1 where 日期>= 本月1号 and 日期<下月1号
union all
Select 某字段,0 as F1,Sum(金额) as F2 From table1 where 日期>= 本年1月1号 and 日期<下月1号
) as a