ArioMK-Distribution of Swapper by # of Swaps
    Updated 2023-09-15
    with price as (
    select
    date_trunc(day, HOUR) as day,
    SYMBOL,
    avg(PRICE) as avg_price
    from base.price.ez_hourly_token_prices
    where SYMBOL in ('DAI', 'USDbC', 'cbETH')
    group by 1,2

    union all

    select
    date_trunc(day, HOUR) as date,
    SYMBOL,
    avg(PRICE) as avg_price
    from ethereum.price.ez_hourly_token_prices
    where SYMBOL in ('WETH', 'MAV')
    group by 1,2
    )
    select
    case when "Swap Count" <= 1 then 'A: 1 TX'
    when "Swap Count" between 2 and 5 then 'B: 2-4 TXs'
    when "Swap Count" between 5 and 10 then 'C: 5-9 TXs'
    else 'D: > 10 TXs'
    end as status
    ,count(distinct Swapper) as Swapper_Count
    from (
    select
    ORIGIN_FROM_ADDRESS as Swapper
    ,count(distinct TX_HASH) as "Swap Count"
    from
    base.defi.ez_dex_swaps
    join price b on symbol_in = symbol and date_trunc(day, block_timestamp) = b.day
    where
    platform = 'maverick'
    and block_timestamp::date >= '2023-08-09'
    Run a query to Download Data