-- Custom prices that do not expire
-- This report shows custom prices that expire after 2050
-- FILTER: {
--   filter: "link",
--   column: "link",
--   "params": {
--         "blank": true,
--         "display": "View Invoice"
--     }
-- }
-- FILTER: {
--   filter: "link",
--   column: "explore",
--   "params": {
--         "blank": true,
--         "display": "Explore"
--     }
-- }
-- FILTER: {
--   filter: "date",
--   column: "create_date",
--   params: {
--     "format": "m/d/y"
--   }
-- }

SELECT id, create_date, expiration_date,
       concat('https://simple123.com/distributor/distributors/', location_id, '/productprices/', id) as link,
       concat('https://simple123.com/distributor/distributors/', location_id, '/productprices/', id, '/explore') as explore
From simplebrsprod.deal_productprice
WHERE expiration_date >= '2055-01-01'::date
ORDER BY create_date ASC limit 500;