CUBE « Analytical Functions « Oracle PL/SQL Tutorial

16.8.1.Using the CUBE Clause
16.8.2.Include two columns in CUBE function
16.8.3.GROUPING() with CUBE demo
16.8.4.Using ROLLUP, CUBE, and GROUPING SETS Operators with Analytic Functions
16.8.5.Use CUBE and RANK() to get all rankings of salaries by city and description
16.8.6.CUBE: get rollups for both columns
16.8.7.Count employees, group by CUBE(department no, job title) by CUBE(department no, job title)