开发者

Where is the spec for "grand total" in oracles group by grouping sets?

This is a valid sql statment for oracle 11 sql:

select LASTNAME, SUM(ID) from PERSON group by grouping sets ((LASTNAME), ())

But I can not find the specification for the grand total "()" in the Oracle® Database SQL Language Reference. Can someone please show me where I开发者_StackOverflow can find the specification for this?


You mean this?


Why not just:

select lastname, sum(id)
from person
group by rollup(lastname);

This should give you the total you seek.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜