Updated 3 days ago
    with

    main as (
    select
    tx_id,
    block_timestamp,
    swapper,
    swap_from_symbol as symbol_in,
    swap_to_symbol as symbol_out,
    abs(nvl(swap_from_amount_usd, swap_to_amount_usd)) as amount_usd,
    case
    when platform ilike 'jupiter%' then 'Jupiter'
    when platform ilike 'raydium%' then 'Raydium'
    when platform ilike 'meteora%' then 'Meteora'
    when platform ilike 'saber%' then 'Saber'
    when platform ilike 'orca%' then 'Orca'
    else initcap(platform)
    end as platform
    from
    solana.marinade.ez_swaps
    where
    succeeded
    and 'MSOL' in (symbol_in, symbol_out)
    )

    select
    count(distinct tx_id) as swaps,
    count(distinct swapper) as swappers,
    sum(amount_usd) as volume_usd,
    avg(amount_usd) as average_amount_usd
    from
    main
    Last run: 3 days ago
    SWAPS
    SWAPPERS
    VOLUME_USD
    AVERAGE_AMOUNT_USD
    1
    313718395253727896206394.53180.096261274
    1
    47B
    3s