CSC 371 Lecture Notes - Lecture 12: Bar Chart, American Express
Document Summary
How many orders are up to , between and , between and , more than. Select paymenttype, sum(case when 0<=totalprice and totalprice<10 then 1 else 0. End) as cnt10, sum(case when 10<=totalprice and totalprice<100 then 1 else 0 end) As cnt100, sum(case when 100<=totalprice and totalprice<1000 then 1 else 0 end) as cnt1000, sum(case when 1000<=totalprice then 1 else 0 end) as cnt_1000, count(*) Clustered columns: bar chart grouped by category. Stacked columns normalized: bar charts where categories are stacked relatively ( /100%) Two axes: can represent two items on the same graph that have sig. diff. values. *can have two chart types in same graph* Solution so that solutions with sig. small answers are grouped together under other by count. Solution so that solutions with sig. small answers are grouped together under other by % Having cnt >= 0. 02 * (select count(*) from orders) Having cnt < 0. 02 * (select count(orderid) from orders));