aggregated to agg

This commit is contained in:
Joaquin 2024-11-05 12:17:26 +01:00
parent f601b69c7d
commit 092e37d58c
28 changed files with 94 additions and 94 deletions

View file

@ -6,104 +6,104 @@ previous year for each line & computing relative increment. --
with
created_bookings as (
select *
from {{ ref("int_kpis__aggregated_mtd_created_bookings") }}
from {{ ref("int_kpis__agg_mtd_created_bookings") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
union all
select *
from {{ ref("int_kpis__aggregated_monthly_created_bookings") }}
from {{ ref("int_kpis__agg_monthly_created_bookings") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
),
check_out_bookings as (
select *
from {{ ref("int_kpis__aggregated_mtd_check_out_bookings") }}
from {{ ref("int_kpis__agg_mtd_check_out_bookings") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
union all
select *
from {{ ref("int_kpis__aggregated_monthly_check_out_bookings") }}
from {{ ref("int_kpis__agg_monthly_check_out_bookings") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
),
cancelled_bookings as (
select *
from {{ ref("int_kpis__aggregated_mtd_cancelled_bookings") }}
from {{ ref("int_kpis__agg_mtd_cancelled_bookings") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
union all
select *
from {{ ref("int_kpis__aggregated_monthly_cancelled_bookings") }}
from {{ ref("int_kpis__agg_monthly_cancelled_bookings") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
),
billable_bookings as (
select *
from {{ ref("int_kpis__aggregated_mtd_billable_bookings") }}
from {{ ref("int_kpis__agg_mtd_billable_bookings") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
union all
select *
from {{ ref("int_kpis__aggregated_monthly_billable_bookings") }}
from {{ ref("int_kpis__agg_monthly_billable_bookings") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
),
created_guest_journeys as (
select *
from {{ ref("int_kpis__aggregated_mtd_created_guest_journeys") }}
from {{ ref("int_kpis__agg_mtd_created_guest_journeys") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
union all
select *
from {{ ref("int_kpis__aggregated_monthly_created_guest_journeys") }}
from {{ ref("int_kpis__agg_monthly_created_guest_journeys") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
),
started_guest_journeys as (
select *
from {{ ref("int_kpis__aggregated_mtd_started_guest_journeys") }}
from {{ ref("int_kpis__agg_mtd_started_guest_journeys") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
union all
select *
from {{ ref("int_kpis__aggregated_monthly_started_guest_journeys") }}
from {{ ref("int_kpis__agg_monthly_started_guest_journeys") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
),
completed_guest_journeys as (
select *
from {{ ref("int_kpis__aggregated_mtd_completed_guest_journeys") }}
from {{ ref("int_kpis__agg_mtd_completed_guest_journeys") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
union all
select *
from {{ ref("int_kpis__aggregated_monthly_completed_guest_journeys") }}
from {{ ref("int_kpis__agg_monthly_completed_guest_journeys") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
),
guest_journeys_with_payment as (
select *
from {{ ref("int_kpis__aggregated_mtd_guest_journeys_with_payment") }}
from {{ ref("int_kpis__agg_mtd_guest_journeys_with_payment") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
union all
select *
from {{ ref("int_kpis__aggregated_monthly_guest_journeys_with_payment") }}
from {{ ref("int_kpis__agg_monthly_guest_journeys_with_payment") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
@ -114,13 +114,13 @@ with
int_mtd_deal_metrics as (select * from {{ ref("int_mtd_deal_metrics") }}),
guest_payments as (
select *
from {{ ref("int_kpis__aggregated_mtd_guest_payments") }}
from {{ ref("int_kpis__agg_mtd_guest_payments") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'
union all
select *
from {{ ref("int_kpis__aggregated_monthly_guest_payments") }}
from {{ ref("int_kpis__agg_monthly_guest_payments") }}
where
dimension in ('global', 'by_number_of_listings', 'by_billing_country')
and dimension_value <> 'UNSET'