SQL语句写出来的一张表,怎么把物料代码的那一行相同的物料,存货数量相加,怎么写?
展开全部
SELECT t2.fnumber as '料号',count(*) as ‘存货数量’
FROM icinventory t1,t_icitem t2
where 你的条件...
group by t2.fnumber
FROM icinventory t1,t_icitem t2
where 你的条件...
group by t2.fnumber
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
SELECT SUM(FQty) as ‘存货数量’, fnumber as '料号'
FROM t1
group by fnumber
FROM t1
group by fnumber
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
select t2.fnumber , sum(t1.fqty) from icinventory t1
inner join t_icitem t2
on t1.fitemid = t2.fitemid
where t1.fqty <> 0
order ...
后面的语句自己补上吧
inner join t_icitem t2
on t1.fitemid = t2.fitemid
where t1.fqty <> 0
order ...
后面的语句自己补上吧
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询