Back to home page

OSCL-LXR

 
 

    


0001 -- using default substitutions
0002 
0003 select
0004         n_name,
0005         sum(l_extendedprice * (1 - l_discount)) as revenue
0006 from
0007         customer,
0008         orders,
0009         lineitem,
0010         supplier,
0011         nation,
0012         region
0013 where
0014         c_custkey = o_custkey
0015         and l_orderkey = o_orderkey
0016         and l_suppkey = s_suppkey
0017         and c_nationkey = s_nationkey
0018         and s_nationkey = n_nationkey
0019         and n_regionkey = r_regionkey
0020         and r_name = 'ASIA'
0021         and o_orderdate >= date '1994-01-01'
0022         and o_orderdate < date '1994-01-01' + interval '1' year
0023 group by
0024         n_name
0025 order by
0026         revenue desc