SniperWeekly Swap Volume by DEX
    Updated 2024-11-03
    select
    platform,
    trunc(BLOCK_TIMESTAMP::date,'week') as date,
    -- case when TOKEN_in = '0x72e4f9f808c49a2a61de9c5896298920dc4eeea9' then 'SELL'
    -- when TOKEN_out = '0x72e4f9f808c49a2a61de9c5896298920dc4eeea9' then 'BUY' end as type,
    count(DISTINCT ORIGIN_FROM_ADDRESS) as swappers,
    count(DISTINCT TX_HASH) as swaps,
    sum(AMOUNT_IN_USD) as "Volume",
    avg(AMOUNT_IN_USD) as avg_volume_usd
    -- sum(swappers) over (order by date asc) as cumulative_swappers
    from ethereum.defi.ez_dex_swaps
    where AMOUNT_IN_USD is NOT NULL
    and AMOUNT_IN_USD >0
    and TOKEN_in = '0x72e4f9f808c49a2a61de9c5896298920dc4eeea9' OR
    TOKEN_out = '0x72e4f9f808c49a2a61de9c5896298920dc4eeea9'
    group by 1,2
    -- order by 2 desc






    QueryRunArchived: QueryRun has been archived