Album » OptC » q13  (7 Slides)     [Page 1 of 1] :: Jump To  
select
    c_count,
    count(*) as custdist
from
    (
        select
            c_custkey,
            count(o_orderkey)
        from
            customer left outer join orders on
                c_custkey = o_custkey
                and o_totalprice :varies
        group by
            c_custkey
    ) as c_orders (c_custkey, c_count)
group by
    c_count
order by
    custdist desc,
    c_count desc

  Up one level  
plan_diag * Plan Diagram * 1252 x 777 * (107KB)
reduced_diag * 1249 x 778 * (101KB)
cost_diag * Plan Cost Diagram * 1252 x 777 * (129KB)
card_diag * Plan Cardinality Diagram * 1252 x 777 * (132KB)
plan1 * PLAN 1 * 1250 x 870 * (38KB)
  plan_diag  
  reduced_diag  
  cost_diag  
  card_diag  
  plan1  
plan2 * PLAN 2 * 1250 x 870 * (37KB)
plan3 * PLAN 3 * 1250 x 870 * (38KB)
  plan2  
  plan3  
Album last updated on 5/19/07 1:01 AM
Powered by JAlbum 7.1 and BluPlusPlus skin