some progress
This commit is contained in:
parent
f911912b45
commit
606eed9754
4 changed files with 35 additions and 7 deletions
|
|
@ -1,13 +1,16 @@
|
|||
with
|
||||
stg_core__verification_to_payment as (
|
||||
select * from {{ ref("stg_core__verification_to_payment") }}
|
||||
),
|
||||
monster_payment_join as (
|
||||
select vtp.*, vpt.*, p.*, ps."Name"
|
||||
from sync_core."VerificationToPayment" vtp
|
||||
from stg_core__verification_to_payment vtp
|
||||
left join
|
||||
sync_core."VerificationPaymentType" vpt
|
||||
on vtp."VerificationPaymentTypeId" = vpt."Id"
|
||||
left join sync_core."Payment" p on vtp."PaymentId" = p."PaymentId"
|
||||
on vtp.id_verification_to_payment = vpt."Id"
|
||||
left join sync_core."Payment" p on vtp.id_payment = p."PaymentId"
|
||||
left join sync_core."PaymentStatus" ps on p."PaymentStatusId" = ps."Id"
|
||||
where vpt."Name" = 'Fee'
|
||||
where vpt."Name" = 'Fee' -- and vtp."VerificationId" = 800000
|
||||
)
|
||||
select cast("PaymentDueDate" as date) as paymenent_due_at_utc, "Amount" as amount
|
||||
select payment_due_at_utc, "Amount" as amount
|
||||
from monster_payment_join
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue