DELETE FROM plan_table;
COMMIT;

EXPLAIN PLAN FOR
  SELECT calendar_year year, calendar_quarter_desc quarter,
         calendar_month_desc month,
         cust_state_province state,
         SUM(amount_sold) sum_sales
  FROM   sales s, times t, customers c
  WHERE  s.time_id=t.time_id
    AND  s.cust_id=c.cust_id
  GROUP BY GROUPING SETS ((calendar_year, cust_city),
           (calendar_year, cust_city, cust_state_province),
           (calendar_year, calendar_quarter_desc,
            calendar_month_desc, cust_city));

PROMPT new output, using table function
set linesize 132
set pagesize 999
SELECT * FROM TABLE(dbms_xplan.display);