第1个回答 2011-10-18
select t.bm,
(select count(*) from a where a.zl1=1 and a.bm=t.bm group by a.bm) as zl1,
(select count(*) from a where a.zl1=2 and a.bm=t.bm group by a.bm) as zl1,
(select count(*) from b where b.bm=t.bm group by b.bm) as qt
from a tclwyzx希望有所提示,有空到51cto,365testing进一步交流!本回答被网友采纳
第2个回答 2011-10-17
select t.bm,
(select count(*) from a where a.zl1=1 and a.bm=t.bm group by a.bm) as zl1,
(select count(*) from a where a.zl1=2 and a.bm=t.bm group by a.bm) as zl1,
(select count(*) from b where b.bm=t.bm group by b.bm) as qt
from a thello希望对你有帮助。更多到
第3个回答 2011-10-14
select sum(netweight) “净重合计” from weight;本回答被提问者采纳
第4个回答 2011-10-14
sun(字段名称)
第5个回答 2011-10-14
select sum(netweight) from weight