公司所有男性的薪资是多少:
清单:
select * from fukjy where xingb='男'
累计:
select sum(gongz) as 累计 from fukjy where xingb='男' group by xingb
用这句列出了所有薪资,可就是不知道怎计算总值了:你前后明细是不一致的
select id,sum(jianc) as jianc,sum(zhil) as zhil from fukjy where xingb='男' group by id
计算和:不能有ID
select sum(jianc) as jianc,sum(zhil) as zhil from fukjy where xingb='男' group by xingb
select sum(gongz) from
fukjy where xingb='男'