data-dwh-dbt-project/models/intermediate/int_core__verification_payments.sql

24 lines
693 B
MySQL
Raw Normal View History

2024-03-08 18:08:05 +01:00
with
stg_core__verification_to_payment as (
select * from {{ ref("stg_core__verification_to_payment") }}
),
stg_core__verification_payment_type as (
select * from {{ ref("stg_core__verification_payment_type") }}
)
select
vtp.id_verification_to_payment,
vtp.id_payment,
vtp.is_refundable,
vtp.created_at_utc,
vtp.updated_at_utc,
vtp.refund_due_at_utc,
vtp.payment_due_at_utc,
vtp.id_superhog_user,
vtp.id_verification,
vpt.verification_payment_type
from stg_core__verification_to_payment vtp
left join
stg_core__verification_payment_type vpt
on vtp.id_verification_payment_type = vpt.id_verification_payment_type