我在 MSSQL 中发现两者都存在
SELECT <list of columns>, sum(measure) as measure
FROM fact-table
GROUP BY <list of columns> WITH CUBE
和
SELECT <list of columns>, sum(measure) as measure
FROM fact-table
GROUP BY CUBE (<list of columns>)
我在徘徊有什么区别,因为使用它们,我得到了两种语法相同的结果。
我还记得,至少对于 2008 版,快速版支持 WITH CUBE,ROLLUP()、CUBE() 和 GROUPING SETS() 是“企业版”的一个功能