-- product_id is the primary key for this table. -- period_start and period_end indicates the start and end date for sales period, both dates are inclusive. -- The average_daily_sales column holds the ...
format(100.0* sum(case when status = 'Cancelled' then 1 else 0 end) ...