select
c.symbol "Symbol",
count(distinct tx_id) "Swaps Count",
count(distinct swapper) "Swappers Count",
sum(swap_to_amount) "Volume (USD)",
avg(swap_to_amount) "Average Volume (USD)",
median(swap_from_amount) "Median Amount (USD)"
from solana.core.fact_swaps a
join crosschain.core.dim_asset_metadata b
join crosschain.core.dim_asset_metadata c
on a.swap_to_mint = b.token_address
and a.swap_from_mint = c.token_address
where a.block_timestamp >= current_date - interval '2 weeks'
and swap_program = 'raydium v4'
and b.platform = 'solana'
and c.platform = 'solana'
and b.symbol in ('USDT', 'USDC', 'DAI', 'BUSD')
and c.symbol not in ('USDT', 'USDC', 'DAI', 'BUSD')
and a.succeeded = 1
group by 1
order by 2 desc
limit 10