Created
July 20, 2021 06:22
-
-
Save evan4/7315c52bc8c101eae8b796ffea863a73 to your computer and use it in GitHub Desktop.
best_rates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select r.currency_code, round(min(r.sell),2) as sell, | |
round(max(r.buy),2) as buy | |
from rate_ru r | |
where (r.date_json = CURDATE()) and r.exchanger_id <> r.exchanger_id in (select id | |
from exchanger_ru e | |
where (e.centralbank = 0 or e.centralbank is null)) | |
group by r.currency_code order by r.currency_code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment