-- Distributors with Placeholders
-- This report lets you view distributors that have placeholder products
-- FILTER: {
--   filter: "link",
--   column: "link"
-- }

SELECT DISTINCT location_id,
                to_char(COUNT(id), '999,999,999,999') AS count
                (select name from simplebrsprod.business_location where id = location_id) as name,
                concat('https://simple123.com/distributor/distributors/', location_id, '/products/#placeholder') as link
FROM simplebrsprod.prospect_prospectproduct
WHERE converted_to_product_id is null
GROUP BY location_id;