Sample Picasso Diagrams » QT7  (13 Slides)     [Page 1 of 1] :: Jump To  
Query Template

select
    supp_nation,
    cust_nation,
    l_year,
    sum(volume)
from
    (
        select
            n1.n_name as supp_nation,
            n2.n_name as cust_nation,
            extract(year from l_shipdate) as l_year,
            l_extendedprice * (1 - l_discount) as volume
        from
            supplier,
            lineitem,
            orders,
            customer,
            nation n1,
            nation n2
        where
            s_suppkey = l_suppkey
            and o_orderkey = l_orderkey
            and c_custkey = o_custkey
            and s_nationkey = n1.n_nationkey
            and c_nationkey = n2.n_nationkey
            and (
                (n1.n_name = 'FRANCE' and n2.n_name = 'GERMANY')
                or (n1.n_name = 'GERMANY' and n2.n_name = 'FRANCE')
            )
            and l_shipdate between date '1995-01-01' and date '1996-12-31'
            and o_totalprice :varies
            and c_acctbal :varies
    )
group by
    supp_nation,
    cust_nation,
    l_year
order by
    supp_nation,
    cust_nation,
    l_year

Optimizer Diagrams
  Up one level  
Plan Diagram * 1920 x 1170 * (175KB)
Reduced Diagram (20%) * 1920 x 1170 * (166KB)
Cardinality Diagram * 1920 x 1170 * (168KB)
Cost Diagram * 1920 x 1170 * (168KB)
Plan1 * 1920 x 1170 * (117KB)
  Plan Diagram  
  Reduced Diagram (20%)  
  Cardinality Diagram  
  Cost Diagram  
  Plan1  
Plan2 * 1920 x 1170 * (126KB)
Plan3 * 1920 x 1170 * (117KB)
Plan4 * 1920 x 1170 * (117KB)
Plan5 * 1920 x 1170 * (128KB)
Plan6 * 1920 x 1170 * (127KB)
  Plan2  
  Plan3  
  Plan4  
  Plan5  
  Plan6  
Plan7 * 1920 x 1170 * (127KB)
Plan8 * 1920 x 1170 * (117KB)
Plan9 * 1920 x 1170 * (133KB)
  Plan7  
  Plan8  
  Plan9  
Album last updated on 2/9/09 9:58 PM
Powered by Jalbum 8.1 and BluPlusPlus skin
Indian Institute of Science