push filter down one model
This commit is contained in:
parent
30c73b1ab9
commit
761cf409c6
2 changed files with 2 additions and 4 deletions
|
|
@ -63,7 +63,6 @@ with
|
||||||
on cer.from_currency = eu.currency
|
on cer.from_currency = eu.currency
|
||||||
and cer.rate_date_utc = v.checkout_date_utc
|
and cer.rate_date_utc = v.checkout_date_utc
|
||||||
and cer.to_currency = 'GBP'
|
and cer.to_currency = 'GBP'
|
||||||
where version = 'V2'
|
|
||||||
),
|
),
|
||||||
monthly_cancellation_threshold as (
|
monthly_cancellation_threshold as (
|
||||||
select
|
select
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,7 @@ select
|
||||||
id_user_partner,
|
id_user_partner,
|
||||||
id_accommodation,
|
id_accommodation,
|
||||||
version,
|
version,
|
||||||
case
|
case when version = 'V2' then 'Edeposit' else null end as verification_source,
|
||||||
when version = 'V1' then 'Guesty' when version = 'V2' then 'Edeposit' else null
|
|
||||||
end as verification_source,
|
|
||||||
verification_status,
|
verification_status,
|
||||||
nightly_fee_local,
|
nightly_fee_local,
|
||||||
cast(checkout_at_utc as date) - cast(checkin_at_utc as date) as number_nights,
|
cast(checkout_at_utc as date) - cast(checkin_at_utc as date) as number_nights,
|
||||||
|
|
@ -48,3 +46,4 @@ select
|
||||||
created_at_utc,
|
created_at_utc,
|
||||||
created_date_utc
|
created_date_utc
|
||||||
from stg_edeposit__verifications
|
from stg_edeposit__verifications
|
||||||
|
where version = 'V2'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue