Update v_analytics_contract_customer_discounts (#459)

* Initial commit

* Rename view

* Bump migration version
This commit is contained in:
Rikard Bartholf
2025-02-05 17:06:11 +01:00
committed by GitHub
parent ceee950346
commit 44e974b718
+15
View File
@@ -0,0 +1,15 @@
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;