日期:2014-05-18 浏览次数:20358 次
SELECT SJ_CangChu.pinming as 品名, SJ_CangChu.xinghao as 型号, SJ_CangChu.tiaoma as 条码,sum(SJ_Order.num) as 数量 FROM dbo.SJ_Order INNER JOIN dbo.SJ_CangChu ON SJ_Order.outer_sku_id = SJ_CangChu.tiaoma where SJ_Order.status='WAIT_SELLER_SEND_GOODS' group by SJ_CangChu.pinming, SJ_CangChu.xinghao, SJ_CangChu.tiaoma union all SELECT SJ_CangChu.pinming as 品名, SJ_CangChu.xinghao as 型号, SJ_CangChu.tiaoma as 条码,sum(SJ_Order.num) as 数量 FROM dbo.SJ_Order INNER JOIN dbo.SJ_CangChu ON SJ_Order.outer_iid = SJ_CangChu.tiaoma where SJ_Order.status='WAIT_SELLER_SEND_GOODS' group by SJ_CangChu.pinming, SJ_CangChu.xinghao, SJ_CangChu.tiaoma
SELECT SJ_CangChu.pinming as 品名, SJ_CangChu.xinghao as 型号, SJ_CangChu.tiaoma as 条码,sum(SJ_Order.num) as 数量 FROM dbo.SJ_Order INNER JOIN dbo.SJ_CangChu ON SJ_Order.outer_sku_id = SJ_CangChu.tiaoma or SJ_Order.outer_iid = SJ_CangChu.tiaoma where SJ_Order.status='WAIT_SELLER_SEND_GOODS' group by SJ_CangChu.pinming, SJ_CangChu.xinghao, SJ_CangChu.tiaoma