-- Total Sales
-- Description
-- OPTIONS: { ignore: true }
-- FILTER: {
--   filter: "date",
--   column: "Send_Date",
--   params: {
--     "format": "m/d/y"
--   }
-- }
-- FILTER: {
--   filter: "class",
--   column: "total_sales",
--   params: {
--     class: "text-right"
--   }
-- }


SELECT dc.time_period_year, to_char(sum(dc.operator_total_price), '$999,999,999,999.999') total_sales
FROM simplebrsprod.deal_cartitem dc
WHERE dc.cart_is_purchased=True AND dc.location_id = 5358688477118464
GROUP BY dc.time_period_year;


