Addressed comments

This commit is contained in:
Joaquin Ossa 2025-01-29 15:44:07 +01:00
parent a48f6d0f59
commit 63b1eac81f
3 changed files with 12 additions and 9 deletions

View file

@ -34,7 +34,6 @@ with
) as previous_booked_date
from int_core__bookings icb
inner join int_core__user_host icuh on icb.id_user_host = icuh.id_user_host
inner join int_hubspot__deal hd on icuh.id_deal = hd.id_deal
where icuh.id_deal is not null
group by icuh.id_deal, icb.created_date_utc
),
@ -42,12 +41,12 @@ with
select
coalesce(hd.id_deal, h.id_deal) as id_deal,
min(coalesce(hd.live_date_utc, h.created_date_utc)) as created_date_utc
from intermediate.int_hubspot__deal hd
from int_hubspot__deal hd
full outer join
intermediate.int_core__user_host h
int_core__user_host h
on hd.id_deal = h.id_deal
and h.id_deal is not null
where hd.id_deal is not null
and h.id_deal is not null
group by 1
),
deal_historic_booking_dates as (