Stacking
Grouping series together to show relationships to part of a whole
Last updated
Grouping series together to show relationships to part of a whole
Last updated
-- @chart: column
-- @title: Stacking - Example column chart with stacking
-- @groups: Month, Channel
-- @subtitle: An example column chart that has a single stack
-- @formats: currency
-- @series: Sales
-- @stacks: Channel
SELECT
TRUNC(date_closed, 'MONTH') as Month,
Channel,
sum(amount) as Sales
FROM sales
GROUP BY TRUNC(date_closed, 'MONTH'), Channel
ORDER BY TRUNC(date_closed, 'MONTH') ASC;