Adds Onboarding MRR
This commit is contained in:
parent
a6671ee4d0
commit
dab210c607
3 changed files with 55 additions and 2 deletions
|
|
@ -40,6 +40,7 @@ with
|
|||
as current_month_mtd_total_revenue_churn_12m,
|
||||
total_revenue_global_preceding_12_months
|
||||
as current_month_mtd_total_revenue_global_12m,
|
||||
expected_mrr as current_month_mtd_onboarding_mrr,
|
||||
|
||||
-- Previous Year (12 months ago), Month To Date Metrics --
|
||||
previous_year_total_revenue_in_gbp
|
||||
|
|
@ -66,6 +67,7 @@ with
|
|||
as previous_year_mtd_total_revenue_churn_12m,
|
||||
previous_year_total_revenue_global_preceding_12_months
|
||||
as previous_year_mtd_total_revenue_global_12m,
|
||||
previous_year_expected_mrr as previous_year_mtd_onboarding_mrr,
|
||||
|
||||
-- Previous Month, End Of Month Metrics --
|
||||
lag(total_revenue_in_gbp) over (
|
||||
|
|
@ -109,7 +111,10 @@ with
|
|||
) as previous_month_eom_total_revenue_churn_12m,
|
||||
lag(total_revenue_global_preceding_12_months) over (
|
||||
partition by dimension, dimension_value order by date
|
||||
) as previous_month_eom_total_revenue_global_12m
|
||||
) as previous_month_eom_total_revenue_global_12m,
|
||||
lag(expected_mrr) over (
|
||||
partition by dimension, dimension_value order by date
|
||||
) as previous_month_eom_onboarding_mrr
|
||||
|
||||
from int_mtd_vs_previous_year_metrics
|
||||
where
|
||||
|
|
@ -188,6 +193,11 @@ with
|
|||
order by date
|
||||
rows between unbounded preceding and current row
|
||||
) as current_ytd_total_revenue_global_12m,
|
||||
sum(current_month_mtd_onboarding_mrr) over (
|
||||
partition by financial_year, dimension, dimension_value
|
||||
order by date
|
||||
rows between unbounded preceding and current row
|
||||
) as current_ytd_onboarding_mrr,
|
||||
-- Specific treatment for live_deals as it is a counter
|
||||
current_month_mtd_live_deals as current_ytd_live_deals,
|
||||
|
||||
|
|
@ -257,6 +267,11 @@ with
|
|||
order by date
|
||||
rows between unbounded preceding and current row
|
||||
) as previous_ytd_total_revenue_global_12m,
|
||||
sum(previous_year_mtd_onboarding_mrr) over (
|
||||
partition by financial_year, dimension, dimension_value
|
||||
order by date
|
||||
rows between unbounded preceding and current row
|
||||
) as previous_ytd_onboarding_mrr,
|
||||
-- Specific treatment for live_deals as it is a counter
|
||||
previous_year_mtd_live_deals as previous_ytd_live_deals
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue