-- Total Products by Polyclass
-- Description
-- FILTER: {
--   filter: "date",
--   column: "Send_Date",
--   params: {
--     "format": "m/d/y"
--   }
-- }
-- FILTER: {
--   filter: "class",
--   column: "products",
--   params: {
--     class: "text-right"
--   }
-- }

SELECT
    polyclass as name,
    to_char(COUNT(dc.id), '999,999,999,999') as products
FROM simplebrsprod.deal_product dc
GROUP BY polyclass