bergTotal swap numbers of each stablecoins on Raydium at 2 weeks ago
    Updated 2022-12-08
    select
    b.symbol "Symbol",
    count(distinct tx_id) "Swaps Count",
    count(distinct swapper) "Swappers Count",
    sum(swap_from_amount) "Volume (USD)",
    avg(swap_from_amount) "Average Volume (USD)",
    median(swap_from_amount) "Median Amount (USD)"
    from solana.core.fact_swaps a
    join crosschain.core.dim_asset_metadata b
    on a.swap_from_mint = b.token_address
    where a.block_timestamp >= current_date - interval '2 weeks'
    and swap_program = 'raydium v4'
    and platform = 'solana'
    and b.symbol in ('USDT', 'USDC', 'DAI', 'BUSD')
    and a.succeeded = 1
    group by 1
    order by 2 desc limit 10
    Run a query to Download Data