Album » OptC » q7  (17 Slides)     [Page 1 of 1] :: Jump To  
select
    supp_nation,
    cust_nation,
    l_year,
    sum(volume)
from
    (
        select
            n1.n_name as supp_nation,
            n2.n_name as cust_nation,
            YEAR (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 '1995-01-01' and '1996-12-31'
            and o_totalprice :varies
            and c_acctbal :varies
    )as shipping
group by
    supp_nation,
    cust_nation,
    l_year
order by
    supp_nation,
    cust_nation,
    l_year

  Up one level  
plan_diag * Plan Diagram * 1252 x 777 * (198KB)
reduced_diag * 1249 x 778 * (184KB)
cost_diag * Plan Cost Diagram * 1252 x 777 * (203KB)
card_diag * Plan Cardinality Diagram * 1252 x 777 * (203KB)
plan1 * PLAN 1 * 1250 x 870 * (53KB)
  plan_diag  
  reduced_diag  
  cost_diag  
  card_diag  
  plan1  
plan2 * PLAN 2 * 1250 x 870 * (56KB)
plan3 * PLAN 3 * 1250 x 870 * (51KB)
plan4 * PLAN 4 * 1250 x 870 * (49KB)
plan5 * PLAN 5 * 1250 x 870 * (51KB)
plan6 * PLAN 6 * 1250 x 870 * (50KB)
  plan2  
  plan3  
  plan4  
  plan5  
  plan6  
plan7 * PLAN 7 * 1248 x 869 * (53KB)
plan8 * PLAN 8 * 1252 x 869 * (50KB)
plan9 * PLAN 9 * 1252 x 869 * (55KB)
plan10 * PLAN 10 * 1250 x 870 * (49KB)
plan11 * PLAN 11 * 1250 x 870 * (54KB)
  plan7  
  plan8  
  plan9  
  plan10  
  plan11  
plan12 * PLAN 12 * 1250 x 870 * (47KB)
plan13 * PLAN 13 * 1250 x 870 * (56KB)
  plan12  
  plan13  
Album last updated on 5/19/07 12:58 AM
Powered by JAlbum 7.1 and BluPlusPlus skin