Revert cross models
This commit is contained in:
parent
092e37d58c
commit
5bcfd7cb9c
8 changed files with 18 additions and 18 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{{ config(materialized="table", unique_key=["date", "id_deal"]) }}
|
||||
with
|
||||
int_monthly_agg_metrics_history_by_deal as (
|
||||
select * from {{ ref("int_monthly_agg_metrics_history_by_deal") }}
|
||||
int_monthly_aggregated_metrics_history_by_deal as (
|
||||
select * from {{ ref("int_monthly_aggregated_metrics_history_by_deal") }}
|
||||
),
|
||||
agg_metrics_by_deal_over_12_months as (
|
||||
select
|
||||
|
|
@ -28,7 +28,7 @@ with
|
|||
order by am.date
|
||||
rows between 12 preceding and 1 preceding
|
||||
) as sum_listings_booked_in_month_preceding_12_months
|
||||
from int_monthly_agg_metrics_history_by_deal am
|
||||
from int_monthly_aggregated_metrics_history_by_deal am
|
||||
),
|
||||
global_computation_over_12_months as (
|
||||
select
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{{ config(materialized="table", unique_key=["date", "id_deal"]) }}
|
||||
with
|
||||
int_monthly_agg_metrics_history_by_deal as (
|
||||
select * from {{ ref("int_monthly_agg_metrics_history_by_deal") }}
|
||||
int_monthly_aggregated_metrics_history_by_deal as (
|
||||
select * from {{ ref("int_monthly_aggregated_metrics_history_by_deal") }}
|
||||
),
|
||||
int_hubspot__deal as (select * from {{ ref("int_hubspot__deal") }}),
|
||||
deal_history_from_previous_months as (
|
||||
|
|
@ -17,7 +17,7 @@ with
|
|||
coalesce(total_revenue_in_gbp, 0) as revenue_in_gbp,
|
||||
coalesce(created_bookings, 0) as created_bookings,
|
||||
coalesce(listings_booked_in_month, 0) as listings_booked_in_month
|
||||
from int_monthly_agg_metrics_history_by_deal am
|
||||
from int_monthly_aggregated_metrics_history_by_deal am
|
||||
-- Do not show data of ongoing month
|
||||
where am.date < date_trunc('month', current_date)::date
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue