Removed deal lifecycle First-Booked
This commit is contained in:
parent
5186cd2cac
commit
d7f454b326
2 changed files with 6 additions and 18 deletions
|
|
@ -142,11 +142,10 @@ select
|
|||
second_to_last_time_booked_date_utc,
|
||||
cancellation_date_utc,
|
||||
case
|
||||
-- 01-New: The deal has been created this month and has not had any booking.
|
||||
-- 01-New: The deal has been created this month.
|
||||
-- Additionally, the deal has not been offboarded in hubspot.
|
||||
when
|
||||
not deal_has_at_least_one_booking
|
||||
and deal_was_created_this_month
|
||||
deal_was_created_this_month
|
||||
and not deal_has_been_offboarded
|
||||
then '01-New'
|
||||
-- 02-Never Booked: The deal has been created before this month and has not
|
||||
|
|
@ -156,19 +155,12 @@ select
|
|||
and not deal_was_created_this_month
|
||||
and not deal_has_been_offboarded
|
||||
then '02-Never Booked'
|
||||
-- 03-First Time Booked: The deal has been booked for the first time and it
|
||||
-- has been created this month. Additionally, the deal has not been offboarded
|
||||
-- in hubspot.
|
||||
when
|
||||
deal_has_first_booking
|
||||
and has_been_booked_within_current_month
|
||||
and not deal_has_been_offboarded
|
||||
then '03-First Time Booked'
|
||||
-- 04-Active: The deal has had at least 1 booking in its history and it's
|
||||
-- been less than 12 months since the last booking and has not been offboarded
|
||||
-- in hubspot and is not reactivated and is not FTB
|
||||
when
|
||||
deal_has_at_least_one_booking
|
||||
and not deal_was_created_this_month
|
||||
and has_been_booked_within_last_12_months
|
||||
and not deal_has_been_offboarded
|
||||
-- not reactivated
|
||||
|
|
@ -176,8 +168,6 @@ select
|
|||
had_previous_booking_more_than_12_months_before_the_last
|
||||
and has_been_booked_within_current_month
|
||||
)
|
||||
-- not FTB
|
||||
and not (deal_has_first_booking and has_been_booked_within_current_month)
|
||||
then '04-Active'
|
||||
-- 05-Churning: The deal has been offboarded this month. Alternatively, The
|
||||
-- deal has been booked at least once and it's been 12 months since the last
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue