-- Total Products by Category -- Description -- FILTER: { -- filter: "class", -- column: "total_sales", -- params: { -- class: "text-right" -- } -- } select name, polyclass, (select to_char(count(*), '$999,999,999,999.999') from simplebrsprod.deal_product_brand_categories where id=dp.id) as total from simplebrsprod.deal_product dp order by total desc