Back to home page

OSCL-LXR

 
 

    


0001 -- using default substitutions
0002 
0003 select
0004         c_name,
0005         c_custkey,
0006         o_orderkey,
0007         o_orderdate,
0008         o_totalprice,
0009         sum(l_quantity)
0010 from
0011         customer,
0012         orders,
0013         lineitem
0014 where
0015         o_orderkey in (
0016                 select
0017                         l_orderkey
0018                 from
0019                         lineitem
0020                 group by
0021                         l_orderkey having
0022                                 sum(l_quantity) > 300
0023         )
0024         and c_custkey = o_custkey
0025         and o_orderkey = l_orderkey
0026 group by
0027         c_name,
0028         c_custkey,
0029         o_orderkey,
0030         o_orderdate,
0031         o_totalprice
0032 order by
0033         o_totalprice desc,
0034         o_orderdate
0035 limit 100