SQL> conn sh/oracle_4U Connected. SQL> SELECT c.cust_city, t.calendar_quarter_desc, SUM(s.amount_sold) sales_amount 2 FROM sh.sales s, sh.times t, sh.customers c, sh.channels ch 3 WHERE s.time_id = t.time_id AND s.cust_id = c.cust_id AND s.channel_id = ch.channel_id 4 AND c.cust_state_province = 'FL' 5 AND ch.channel_desc = 'Direct Sales' 6 AND t.calendar_quarter_desc IN ('2000-01', '2000-02','1999-12') GROUP BY c.cust_city, 7 t.calendar_quarter_desc; CUST_CITY CALENDA SALES_AMOUNT ------------------------------ ------- ------------ Sanibel 2000-01 15870.34 Saint Marks 2000-01 55781.37 Cypress Gardens 2000-01 3545.82 Saint Marks 2000-02 48858.7 Evinston 2000-01 53509.69 Noma 2000-01 33572.55 Cypress Gardens 2000-02 4928.93 Sanibel 2000-02 17908.67 Winter Springs 2000-02 20 Evinston 2000-02 62657.21 Molino 2000-01 18765.25 CUST_CITY CALENDA SALES_AMOUNT ------------------------------ ------- ------------ Winter Springs 2000-01 31.46 Candler 2000-02 6493.94 Palmdale 2000-01 37793.44 Sugarloaf Key 2000-02 9659.44 Molino 2000-02 17144.7 Sugarloaf Key 2000-01 12027.66 Ocala 2000-02 7081.73 Candler 2000-01 4166.32 Noma 2000-02 23903.58 Blountstown 2000-01 27024.7 Ocala 2000-01 7146.73 CUST_CITY CALENDA SALES_AMOUNT ------------------------------ ------- ------------ Palmdale 2000-02 25829.24 Blountstown 2000-02 38052.58 24 rows selected. SQL> select * from v$pq_sesstat; STATISTIC LAST_QUERY SESSION_TOTAL CON_ID ------------------------------ ---------- ------------- ---------- Queries Parallelized 1 1 0 DML Parallelized 0 0 0 DDL Parallelized 0 0 0 DFO Trees 1 1 0 Server Threads 60 0 0 Allocation Height 30 0 0 Allocation Width 1 0 0 Local Msgs Sent 2020 2020 0 Distr Msgs Sent 0 0 0 Local Msgs Recv'd 2020 2020 0 Distr Msgs Recv'd 0 0 0 STATISTIC LAST_QUERY SESSION_TOTAL CON_ID ------------------------------ ---------- ------------- ---------- DOP 30 0 0 Slave Sets 2 0 0 13 rows selected.
|