DROP VIEW IF EXISTS public.v_funnel_contract_customers;
CREATE OR REPLACE VIEW public.v_funnel_contract_customers
 AS

SELECT  contractcustomerid AS id,
        companyname,
        "delivery-company" AS delivery_companyname,
        COALESCE(discount, 0) AS discount_percent,
        country,
        inserted,
        updated
  FROM  contract_customers
 ORDER  BY 1;

GRANT SELECT ON TABLE public.v_funnel_contract_customers TO funnel;
