34,587
社区成员
发帖
与我相关
我的任务
分享
SELECT S_NAME,SUM(QTY)QTY
FROM A
GROUP BY S_NAME
select a.fGoods_name AS 物品名, sum(b.fnum - c.fOrder_amount) AS 库存 from t_goods a,t_stockin_detail b,t_saleout_detail c
where a.fGoods_id=b.fGoods_id and b.fGoods_id=c.fGoods_id and a.fGoods_id=c.fGoods_id order by fGoods_name
group by a.fGoods_name
select a.fGoods_name AS 物品名, sum(b.fnum - c.fOrder_amount) AS 库存
from t_goods a,t_stockin_detail b,t_saleout_detail c
where a.fGoods_id=b.fGoods_id and b.fGoods_id=c.fGoods_id and a.fGoods_id=c.fGoods_id
group by fGoods_name