select storeID, itemID, custID, sum(price)
from Sales F
group by storeID, custID, itemID
with cube(storeID, custID);我打算在postgreSQL中使用此查询,但它不能直接在postgreSQL中工作,如何将此查询转换为postgreSQL查询?
发布于 2020-12-11 18:44:44
试试这个:
select storeID, itemID, custID, sum(price)
from Sales F
group by cube (storeID, itemID, custID)有关CUBE、GROUPING SETS和ROLLUP.的更多详细信息,请查看this post
https://stackoverflow.com/questions/65249764
复制相似问题