fixed model copy paste
This commit is contained in:
parent
2404905da1
commit
6b5b7d2d5a
1 changed files with 6 additions and 5 deletions
|
|
@ -1,3 +1,5 @@
|
|||
{% set has_payment_true = "('With Payment')" %}
|
||||
|
||||
with
|
||||
guest_journey_metrics as (
|
||||
select
|
||||
|
|
@ -25,8 +27,7 @@ with
|
|||
/ sum(gj.count_csat_score)
|
||||
else null
|
||||
end as average_csat_score
|
||||
from
|
||||
"intermediate"."int_kpis__metric_daily_check_in_attributed_guest_journeys" gj
|
||||
from {{ ref("int_kpis__metric_daily_check_in_attributed_guest_journeys") }} gj
|
||||
group by
|
||||
gj.date,
|
||||
gj.has_payment,
|
||||
|
|
@ -42,7 +43,7 @@ with
|
|||
sum(gp.waiver_payments_in_gbp) as waiver_payments_in_gbp,
|
||||
sum(gp.checkin_cover_fees_in_gbp) as checkin_cover_fees_in_gbp,
|
||||
sum(gp.total_guest_payments_in_gbp) as total_guest_payments_in_gbp
|
||||
from "intermediate"."int_kpis__metric_daily_guest_payments" gp
|
||||
from {{ ref("int_kpis__metric_daily_guest_payments") }} gp
|
||||
where gp.date < current_date
|
||||
group by gp.date, gp.has_id_check, gp.main_billing_country_iso_3_per_deal
|
||||
),
|
||||
|
|
@ -65,7 +66,7 @@ with
|
|||
gp.waiver_payments_in_gbp,
|
||||
gp.checkin_cover_fees_in_gbp,
|
||||
gp.total_guest_payments_in_gbp
|
||||
from "intermediate"."int_kpis__dimension_date_product_guest" dd
|
||||
from {{ ref("int_kpis__dimension_date_product_guest") }} dd
|
||||
left join
|
||||
guest_journey_metrics gj
|
||||
on gj.date = dd.date_day
|
||||
|
|
@ -77,7 +78,7 @@ with
|
|||
guest_payment_metrics gp
|
||||
on gp.date = dd.date_day
|
||||
and gp.has_id_check = dd.has_id_check
|
||||
and dd.has_payment = ('With Payment')
|
||||
and dd.has_payment = {{ has_payment_true }}
|
||||
and gp.main_billing_country_iso_3_per_deal
|
||||
= dd.main_billing_country_iso_3_per_deal
|
||||
-- Restricts the records by date being in the past or in the next following 12
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue