maybeyonaseth2_steth_swaps
    Updated 2022-03-25
    select
    date(block_timestamp) as date,
    count(distinct tx_id) as swaps,
    count(distinct from_address) as users,
    sum(amount_in+amount_out) as total_vol,
    sum(amount_in) as total_in, --buy
    sum(amount_out) as total_out, --sell
    count(
    distinct (case when direction='IN' then tx_id else null end)
    ) as in_swaps,
    count(
    distinct (case when direction='OUT' then tx_id else null end)
    ) as out_swaps,
    count(
    distinct (case when direction='OUT' then from_address else null end)
    ) as out_users,
    count(
    distinct (case when direction='IN' then from_address else null end)
    ) as in_users
    from ethereum.dex_swaps
    where token_address = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84'
    and block_timestamp >= current_date - interval '90 days'
    and amount_usd is not null
    group by 1
    limit 100
    Run a query to Download Data