Skip to content
Advertisement

sql query to fetch exchange rate

Given a sales table with sales amount stored in local currencies and an exchange rate table containing currency conversion rate, to get total sales amount in USD for each sales date I need query

Sales Table:

Exchange Rate Table:

have no idea how I should proceed

I have to do two things match the currency and then check for the same date exchange rate or before sales_date

Advertisement

Answer

Try this:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement