Updated 2024-07-10
    with ethereum as (
    select
    block_timestamp::Date AS date,tx_hash,
    amount_in_usd AS amountUSD,
    origin_from_address as user
    from ethereum.defi.ez_dex_swaps
    where amount_in_usd<power(10,6)
    and tx_hash in (select distinct(tx_hash) from ethereum.core.ez_decoded_event_logs where origin_to_address in ('0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b', '0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad'))
    and date>='2023-01-01'
    and platform = 'uniswap-v3'
    )

    select
    case when date>='2023-10-17' then 'after fee changes' else 'before fee changes' end as type,
    count(distinct(date)) as "Dates",
    count(distinct(user)) as "Users",
    count(distinct tx_hash) as "Total Swaps",
    avg(amountUSD) as "Amount Avg",
    sum(amountUSD) as "Total Volume"
    from ethereum
    group by 1
    QueryRunArchived: QueryRun has been archived