Back to home page

OSCL-LXR

 
 

    


0001 -- using default substitutions
0002 
0003 select
0004         c_count,
0005         count(*) as custdist
0006 from
0007         (
0008                 select
0009                         c_custkey,
0010                         count(o_orderkey) as c_count
0011                 from
0012                         customer left outer join orders on
0013                                 c_custkey = o_custkey
0014                                 and o_comment not like '%special%requests%'
0015                 group by
0016                         c_custkey
0017         ) as c_orders
0018 group by
0019         c_count
0020 order by
0021         custdist desc,
0022         c_count desc