do both rates to compare and test
This commit is contained in:
parent
e3be2708ad
commit
6f625ec7db
1 changed files with 6 additions and 0 deletions
|
|
@ -35,6 +35,7 @@ select
|
||||||
p.amount as amount_in_txn_currency,
|
p.amount as amount_in_txn_currency,
|
||||||
p.currency,
|
p.currency,
|
||||||
(p.amount * r.rate) as amount_in_gbp,
|
(p.amount * r.rate) as amount_in_gbp,
|
||||||
|
(p.amount * nr.rate) as new_amount_in_gbp,
|
||||||
ps.payment_status,
|
ps.payment_status,
|
||||||
p.notes
|
p.notes
|
||||||
from stg_core__verification_to_payment vtp
|
from stg_core__verification_to_payment vtp
|
||||||
|
|
@ -49,3 +50,8 @@ left join
|
||||||
on p.paid_date_utc = r.rate_date
|
on p.paid_date_utc = r.rate_date
|
||||||
and p.currency = r.from_currency
|
and p.currency = r.from_currency
|
||||||
and r.to_currency = 'GBP'
|
and r.to_currency = 'GBP'
|
||||||
|
left join
|
||||||
|
int_simple_exchange_rates nr
|
||||||
|
on p.paid_date_utc = nr.rate_date_utc
|
||||||
|
and p.currency = nr.from_currency
|
||||||
|
and nr.to_currency = 'GBP'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue