diff --git a/models/core_/fct__monthly__financials.sql b/models/core_/fct__monthly__financials.sql index 6c89edf2..14d9df73 100644 --- a/models/core_/fct__monthly__financials.sql +++ b/models/core_/fct__monthly__financials.sql @@ -26,7 +26,7 @@ WITH final AS ( {% if target.name == 'sf' %} SELECT date_trunc('month', sub_created_at) as date_month - , count(distinct org_id) as cnt_subscribers + , count(distinct org_id) + 1 as cnt_subscribers , sum(sub_price) as sum_revenue FROM {{ ref('dim__orgs') }} WHERE sub_created_at is not NULL @@ -35,7 +35,7 @@ WITH final AS ( {% elif target.name == 'db' %} SELECT date_trunc('month', sub_created_at) as date_month - , count(distinct org_id) as cnt_subscribers + , count(distinct org_id) + 1 as cnt_subscribers , sum(sub_price) as sum_revenue FROM {{ ref('dim__orgs') }} WHERE sub_created_at is not NULL @@ -44,7 +44,7 @@ WITH final AS ( {% elif target.name == 'bq' %} SELECT TIMESTAMP_TRUNC(sub_created_at, month) AS date_month, - COUNT(DISTINCT org_id) AS cnt_subscribers, + COUNT(DISTINCT org_id) + 1 AS cnt_subscribers, SUM(sub_price) AS sum_revenue FROM {{ ref('dim__orgs') }} WHERE NOT sub_created_at IS NULL @@ -53,7 +53,7 @@ WITH final AS ( {% else %} SELECT date_trunc('month', sub_created_at) as date_month - , count(distinct org_id) as cnt_subscribers + , count(distinct org_id) + 1 as cnt_subscribers , sum(sub_price) as sum_revenue FROM {{ ref('dim__orgs') }} WHERE sub_created_at is not NULL