Sample Picasso Diagrams » QT12  (7 Slides)     [Page 1 of 1] :: Jump To  
Query Template

select
    l_shipmode,
    sum(case
        when o_orderpriority = '1-URGENT'
            or o_orderpriority = '2-HIGH'
            then 1
        else 0
    end) as high_line_count,
    sum(case
        when o_orderpriority <> '1-URGENT'
            and o_orderpriority <> '2-HIGH'
            then 1
        else 0
    end) as low_line_count
from
    orders,
    lineitem
where
    o_orderkey = l_orderkey
    and o_totalprice :varies
and l_extendedprice :varies
group by
    l_shipmode
order by
    l_shipmode

Optimizer Diagrams
  Up one level  
Plan Diagram * 1920 x 1170 * (159KB)
Reduced Diagram (20%) * 1920 x 1170 * (161KB)
Cardinality Diagram * 1920 x 1170 * (157KB)
Cost Diagram * 1920 x 1170 * (159KB)
Plan1 * 1920 x 1170 * (105KB)
  Plan Diagram  
  Reduced Diagram (20%)  
  Cardinality Diagram  
  Cost Diagram  
  Plan1  
Plan2 * 1920 x 1170 * (105KB)
Plan3 * 1920 x 1170 * (107KB)
  Plan2  
  Plan3  
Album last updated on 2/9/09 9:58 PM
Powered by Jalbum 8.1 and BluPlusPlus skin
Indian Institute of Science