SELECT
CONCAT(from_asset, ' --> ', SPLIT_PART(to_asset, '-', 1)) AS asset_pair,
COUNT(DISTINCT tx_id) AS transaction_count,
SUM(COALESCE(from_amount_usd, to_amount_usd)) AS volume_usd
FROM thorchain.defi.fact_swaps
WHERE affiliate_address = 'bgw'
GROUP BY asset_pair
ORDER BY transaction_count DESC
LIMIT 10;