Ali3NBy DEX & Pair JACK Swap Pairs' Stats in Avalanche DEXs
    Updated 4 hours ago
    with savaxpricet as (
    select hour,
    avg (price) as savaxprice
    from avalanche.price.ez_prices_hourly
    where token_address = '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be'
    and hour >= '2025-03-01'
    group by 1)

    select case when platform ilike '%trader-joe%' then 'Trader Joe'
    when platform ilike '%uniswap%' then 'Uniswap'
    when platform ilike '%pharaoh%' then 'Pharaoh' else initcap(platform) end as dex,
    symbol_in || ' => ' || symbol_out as Trading_Pair,
    count (distinct tx_hash) as TX_Count,
    count (distinct origin_from_address) as Traders_Count,
    sum (case when token_in = '0x3fe4902b275caf603c46c81f3d921bb8515b5bc0' then amount_in
    when token_out = '0x3fe4902b275caf603c46c81f3d921bb8515b5bc0' then amount_out end) as Total_Trading_Volume,
    sum (case when amount_in_usd > 0 or amount_out_usd > 0 then coalesce(amount_in_usd,amount_out_usd,0) when token_in = '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be' then amount_in*savaxprice when token_out = '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be' then amount_out*savaxprice end) as Total_USD_Trading_Volume,
    avg (case when token_in = '0x3fe4902b275caf603c46c81f3d921bb8515b5bc0' then amount_in
    when token_out = '0x3fe4902b275caf603c46c81f3d921bb8515b5bc0' then amount_out end) as Average_Trading_Volume,
    avg (case when amount_in_usd > 0 or amount_out_usd > 0 then coalesce(amount_in_usd,amount_out_usd,0) when token_in = '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be' then amount_in*savaxprice when token_out = '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be' then amount_out*savaxprice end) as Average_USD_Trading_Volume,
    from avalanche.defi.ez_dex_swaps t1 left outer join savaxpricet t3 on date_trunc (hour,t1.block_Timestamp) = t3.hour
    where token_in in ('0x3fe4902b275caf603c46c81f3d921bb8515b5bc0')
    or token_out = '0x3fe4902b275caf603c46c81f3d921bb8515b5bc0'
    group by 1,2






    Last run: about 4 hours agoAuto-refreshes every 6 hours
    DEX
    TRADING_PAIR
    TX_COUNT
    TRADERS_COUNT
    TOTAL_TRADING_VOLUME
    TOTAL_USD_TRADING_VOLUME
    AVERAGE_TRADING_VOLUME
    AVERAGE_USD_TRADING_VOLUME
    1
    Trader JoesAVAX => JACK9793213274848.46283377273075.4665464713331.483685487277.798033109
    2
    Trader JoeJACK => WAVAX7418646.54685600757.331.8110556190.184340836
    3
    PharaohWAVAX => JACK1667443937.8519437673474.49264.68585508320.930662651
    4
    Trader JoeWAVAX => JACK379447.02910313938.711.8171914760.1735874439
    5
    PharaohJACK => WAVAX1968648648.9955682963894.85248.20916106319.871683673
    6
    Trader JoeJACK => sAVAX11964224303249.39877926381498.9994539533568.200164825316.334162068
    6
    540B
    9s