commit wip
This commit is contained in:
parent
bf1e125856
commit
1ced79ca0a
2 changed files with 9 additions and 17 deletions
|
|
@ -44,18 +44,14 @@ with
|
|||
case
|
||||
when upper(hd.deal_pipeline) in ('API SALES') then 'API' else 'PLATFORM'
|
||||
end as client_type,
|
||||
min(
|
||||
coalesce(hd.deal_start_date, cd.deal_start_date)
|
||||
) as effective_deal_start_date_utc,
|
||||
min(
|
||||
coalesce(hd.deal_start_month, cd.deal_start_month)
|
||||
) as effective_deal_start_month,
|
||||
hd.deal_start_date as effective_deal_start_date_utc,
|
||||
hd.deal_start_month as effective_deal_start_month,
|
||||
min(hd.deal_cancellation_date) as hubspot_deal_cancellation_date_utc,
|
||||
min(hd.deal_cancellation_month) as hubspot_deal_cancellation_month,
|
||||
min(hd.hubspot_listing_segmentation) as hubspot_listing_segmentation
|
||||
from hubspot_deals hd
|
||||
full outer join core_deals cd on hd.id_deal = cd.id_deal
|
||||
group by 1, 2, 3, 4, 5, 6
|
||||
group by 1, 2, 3, 4, 5, 6, 7, 8
|
||||
)
|
||||
select
|
||||
cd.id_deal,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue