raena_analytics_scripts/OOS/sample.sql

19 lines
574 B
SQL

--------------------------Revenue Leakage -------------------------
drop table public.om_dormant_sellers_filter;
create table public.om_dormant_sellers_filter
as
select reseller_email,'' as brand_name,'' as sku,Dornant_flag
from public.om_dormant_sellers_filter_base_1
where reseller_email notnull and reseller_email!=''
union
select reseller_email,brand_name,'' as sku,month_cohort
from public.OM_Reseller_brand_month_filter
where reseller_email notnull and reseller_email!='';