如何在1个select语句中使用2个Sums?

use*_*843 2 sql ms-access

我想在一个查询中得到2行2个独立表的总和.我试过这个:

SELECT SUM(Items.Price) AS [Total Items], SUM(Stores.Cash) AS [Total Cash]
FROM Items, Stores
Run Code Online (Sandbox Code Playgroud)

但是,查询返回价格*商店数量和商店总现金*项目数量之和.什么地方出了错?

小智 6

用这个

SELECT SUM(Price) AS [Total Items]
     , (SELECT SUM(Cash) AS [Total Cash] FROM Stores)
FROM Items
Run Code Online (Sandbox Code Playgroud)