Afonso_Diazswaps total
    Updated 2023-12-31
    with t as (
    select
    tx_hash,
    block_timestamp,
    iff(block_timestamp::date >= '2023-08-27', 'Bull Market', 'Bear Market') as timespan,
    sender as user,
    abs(amount0_usd) as amount_usd
    from
    ethereum.uniswapv3.ez_swaps
    where amount_usd < 1e7
    )

    select
    timespan,
    count(distinct tx_hash) as transactions,
    sum(amount_usd) as volume,
    avg(amount_usd) as avg_volume,
    count(distinct user) as users
    from
    t
    where block_timestamp::date >= '2023-01-01'
    group by 1


    QueryRunArchived: QueryRun has been archived