PROMPT full access AND joinback to dimension customers
PROMPT decompose of grouping levels into UNION ALL

DELETE FROM plan_table;
COMMIT;

EXPLAIN PLAN FOR
  SELECT   calendar_year year, calendar_quarter_desc quarter,
           cust_state_province state, country_id,
           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, country_id),
                          (calendar_year, cust_state_province),
                          (calendar_year, calendar_quarter_desc,
                           cust_state_province));

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