Ali3NPLSR Swap Pairs' Stats in Avalanche DEXs
    Updated 7 days ago
    with pricet as (
    select date_trunc (day,block_timestamp) as day,
    '0x7a842193d291840fc38b45f991c5b8cc908f8a7c' as token_address,
    'PLSR' as symbol,
    '18' as decimals,
    avg (amount_in_usd/amount_out) as USDPrice
    from avalanche.defi.ez_dex_swaps
    where (symbol_in = 'WAVAX' or symbol_in ilike 'USDC')
    and (symbol_out = 'PLSR' or token_out = '0x7a842193d291840fc38b45f991c5b8cc908f8a7c')
    and block_timestamp >= '2025-02-05'
    group by 1,2,3,4 having USDPrice < 10

    union all

    select hour::date as day,
    token_address,
    'USDC' as symbol,
    decimals,
    avg (price) as usdprice
    from avalanche.price.ez_prices_hourly
    where token_address ilike '0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E'
    group by 1,2,3,4),

    maindextable as (
    select block_timestamp,
    tx_hash,
    origin_from_address,
    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,
    Token_In,
    symbol_in,
    Amount_In,
    Amount_In_USD,
    Token_Out,
    symbol_out,
    Last run: 7 days agoAuto-refreshes every 24 hours
    TRADING_PAIR
    TX_COUNT
    TRADERS_COUNT
    TOTAL_TRADING_VOLUME
    TOTAL_USD_TRADING_VOLUME
    AVERAGE_TRADING_VOLUME
    AVERAGE_USD_TRADING_VOLUME
    1
    PLSR => WAVAX7623116484461.40491012182736.542802.27372727378.969982714
    2
    WAVAX => PLSR6281565567135.66083341149962.922715.67593211473.152643902
    3
    PLSR => USDC2410502857.8242709568302.29300193220952.409344623345.92887508
    4
    USDC => PLSR188102910.5094719562218.9706072365717.25052622123.276144846
    4
    329B
    184s