blob: 71b21ab2659d92031e517e9c1fae537ce60b1d7d [file] [log] [blame]
select promotion.media_type as c0 from promotion as promotion, sales_fact_1997 as sales_fact_1997, time_by_day as time_by_day where sales_fact_1997.promotion_id = promotion.promotion_id and sales_fact_1997.time_id = time_by_day.time_id and time_by_day.the_year = 1997 group by promotion.media_type order by sum(sales_fact_1997.unit_sales) DESC NULLS LAST, promotion.media_type ASC NULLS LAST;