fixing copy paste

This commit is contained in:
Joaquin Ossa 2025-01-03 12:00:14 +01:00
parent 0aeb558a9b
commit dbf807639e

View file

@ -5,7 +5,7 @@ with
core_deal_counts as (
select id_deal, count(distinct company_name) as core_company_name_count
from intermediate.int_core__unified_user
from int_core__unified_user
where id_deal is not null
group by id_deal
),
@ -18,7 +18,7 @@ with
row_number() over (
partition by u.id_deal order by u.company_name
) as row_num
from intermediate.int_core__unified_user u
from int_core__unified_user u
left join core_deal_counts c on u.id_deal = c.id_deal
where u.id_deal is not null
),
@ -30,7 +30,7 @@ with
hubspot_deal_counts as (
select id_deal, count(distinct deal_name) as hubspot_deal_name_count
from intermediate.int_hubspot__deal
from int_hubspot__deal
where id_deal is not null
group by id_deal
),
@ -41,7 +41,7 @@ with
h.deal_name as hubspot_deal_name,
c.hubspot_deal_name_count,
row_number() over (partition by h.id_deal order by h.deal_name) as row_num
from intermediate.int_hubspot__deal h
from int_hubspot__deal h
left join hubspot_deal_counts c on h.id_deal = c.id_deal
where h.id_deal is not null
),
@ -53,7 +53,7 @@ with
xero_contact_counts as (
select id_deal, count(distinct contact_name) as xero_contact_name_count
from intermediate.int_xero__contacts
from int_xero__contacts
where id_deal is not null
group by id_deal
),
@ -66,7 +66,7 @@ with
row_number() over (
partition by x.id_deal order by x.contact_name
) as row_num
from intermediate.int_xero__contacts x
from int_xero__contacts x
left join xero_contact_counts c on x.id_deal = c.id_deal
where x.id_deal is not null
),