-- Highest Price Products
-- This report shows the products with the highest price
-- 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"
--   }
-- }https://www.simple123.com/business/invoices/6266893565952000/invoiceitems/5566284139331584/explore


select id, cart_id, location_id, purchase_price, operator_purchase_price,
       concat('https://simple123.com/business/locations/', location_id, '/invoices/', cart_id) as link,
       concat('https://simple123.com/business/invoices/', cart_id, '/invoiceitems/', id, '/explore') as explore
from simplebrsprod.deal_cartitem
WHERE purchase_price is not  null
order by purchase_price desc limit 100;