Get Currency with Flag Image
select c.iso_code, c.name, c.symbol, i.key as flag_key
from ores.currencies c
left join ores.currency_images ci on ci.iso_code = c.iso_code
and ci.valid_to = '9999-12-31 23:59:59'::timestamptz
left join ores.images i on i.image_id = ci.image_id
and i.valid_to = '9999-12-31 23:59:59'::timestamptz
where c.valid_to = '9999-12-31 23:59:59'::timestamptz
and c.iso_code = 'GBP';
| iso_code | name | symbol | flag_key |
|----------+------------------------+--------+----------|
| GBP | British Pound Sterling | £ | gb |
Emacs 29.3 (Org mode 9.6.15)