50金币
最佳答案SELECT [设备清单].,[设备清单].[公司],[设备清单].[商品],[清单数量],[单价],[金额],[申请数量],[入库数量] FROM [设备清单]
JOIN (SELECT [公司],[商品],SUM([申请数量]) AS [申请数量] FROM [采购申请] GROUP BY [公司],[商品]) AA
on [设备清单].[公司]=[AA].[公司] AND [设备清单].[商品]=[AA].[商品]
JOIN (SELECT [公司],[商品],SUM([入库数量]) AS [入库数量] FROM [采购入库] GROUP BY [公司],[商品]) BB
on [ ...
| |
| |
| |
| |
| |
| |
| |