with a as (select SWAP_FROM_ASSET_ID, SWAP_to_ASSET_ID, count(distinct FACT_SWAP_ID) as n_swap_txn, count(distinct SWAPPER) as n_swapper
from algorand.defi.fact_swap
group by 1,2)
select concat(s1.asset_name ,' - ', s2.asset_name ) as pair,n_swapper, n_swap_txn
from a
inner join algorand.defi.ez_price_swap as s1 on a.SWAP_FROM_ASSET_ID = s1.asset_id
inner join algorand.defi.ez_price_swap as s2 on a.SWAP_to_ASSET_ID = s2.asset_id
group by 1,2,3 order by 2 desc
limit 5