with table1 as
(select from_asset, sum(from_amount_usd) as sum_from
from thorchain.swaps
where from_amount_usd is not null
group by from_asset),
table2 as
(select to_asset, sum(to_amount_usd) as sum_to
from thorchain.swaps
where to_amount_usd is not null
group by to_asset)
select from_asset as asset, sum_from, sum_to, sum_from/sum_to as Net_Swapping_Rations
from table1
outer join table2
on from_asset = to_asset
order by Net_Swapping_Rations desc