fuck around with Uri
This commit is contained in:
parent
ac1aed029d
commit
0aaec6a619
1 changed files with 13 additions and 5 deletions
|
|
@ -7,10 +7,15 @@ with
|
|||
select * from {{ ref("stg_core__verification_payment_type") }}
|
||||
),
|
||||
stg_core__verification as (select * from {{ ref("stg_core__verification") }}),
|
||||
stg_core__verification_request as (select * from {{ ref("stg_core__verification_request") }}),
|
||||
stg_core__verification_request as (
|
||||
select * from {{ ref("stg_core__verification_request") }}
|
||||
),
|
||||
stg_core__payment as (select * from {{ ref("stg_core__payment") }}),
|
||||
stg_core__payment_status as (select * from {{ ref("stg_core__payment_status") }}),
|
||||
int_simple_exchange_rates as (select * from {{ ref("int_simple_exchange_rates") }})
|
||||
int_simple_exchange_rates as (select * from {{ ref("int_simple_exchange_rates") }}),
|
||||
stg_seed__guest_services_vat_rates_by_country as (
|
||||
select * from {{ ref("stg_seed__guest_services_vat_rates_by_country") }}
|
||||
)
|
||||
select
|
||||
vtp.id_verification_to_payment,
|
||||
vtp.id_payment,
|
||||
|
|
@ -30,6 +35,9 @@ select
|
|||
-- Host User identifier is included to speed up
|
||||
-- KPIs execution, even though the host itself
|
||||
-- has nothing to do with the guest payments.
|
||||
-- ---------------------------------------------
|
||||
-- Pablo here, I promise I'll find a way to improve performance and get rid
|
||||
-- of this uglyness. Oh god, it hurts.
|
||||
vr.id_user_host,
|
||||
vtp.id_guest_user,
|
||||
vtp.id_verification,
|
||||
|
|
@ -52,6 +60,6 @@ left join
|
|||
on vtp.payment_due_date_utc = r.rate_date_utc
|
||||
and p.currency = r.from_currency
|
||||
and r.to_currency = 'GBP'
|
||||
left join
|
||||
stg_core__verification_request vr
|
||||
on v.id_verification_request = vr.id_verification_request
|
||||
left join
|
||||
stg_core__verification_request vr
|
||||
on v.id_verification_request = vr.id_verification_request
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue