Code: Select all
select c.currency_symbol, c.currencyname, c.baseconvrate, c2.currency_symbol as base_symbol
   from currencyformats_v1 c
   left join infotable_v1 i on i.infoname='BASECURRENCYID'
   left join  currencyformats_v1 c2 on c2.currencyid = i.infovalue