Understanding the differences between CUBE and ROLLUP

后端 未结 4 1603
被撕碎了的回忆
被撕碎了的回忆 2020-12-22 19:30

My assignment asked me to find out \"how many invoices are written for each date?\"

I was a little stuck and asked my professor for help. She emailed me a query that

4条回答
  •  情书的邮戳
    2020-12-22 19:54

    You can find more detail about GROUPING SET, CUBE, ROLL UP. TL;DR they just expand GROUP BY + UNION ALL in some ways to get aggregation :)

    https://technet.microsoft.com/en-us/library/bb510427(v=sql.105).aspx

提交回复
热议问题