Ali3NTraders Leaderboad $PLSR Avalanche DEXs
    Updated 2025-03-23
    -- forked from Dately PLSR Swaps Stats on Avalanche Over Time @ https://flipsidecrypto.xyz/studio/queries/199f9d27-aceb-452c-992c-b2471539d776

    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,
    Last run: about 1 month ago
    ORIGIN_FROM_ADDRESS
    TRADING_VOLUME
    TRADES
    1
    0x72e9dc65f091c865b220b4c751c9c21d30a881e8220956.606089487338
    2
    0x31bbab9da20a2d0eb65c187c45f440af4d2bb65f12993.113
    3
    0x4ed0d33399dfa9aad05472525cf124a2157b00846991.40822264316
    4
    0x71a3eba8b6f0b0510e0f3c8fffc4811665f471c76499.1530
    5
    0x6e59dae8224edd130d877b1aa39343c9ab8aabf96231.715
    6
    0xda9f28a1b0ce18b011a404f3372d98c3e31435694915.618
    7
    0xebd5add68b703fc8fd6ef474db1dc79841af18a64493.00778814716
    8
    0xcea84cc79b540736d108940ba608c7d64d5b9d9d3816.185
    9
    0x4ebe3623af5ce5ee07b6d23b5d0f5dae0954f9343802.865
    10
    0xe4b0593b30e48870786f42f4782ca5247e02887f3138.671
    11
    0x1f8e7042b727fd112b5e186925d58b4480b62a2e2996.262
    12
    0x04054e9aea6fdf7b520296c9438d6991ca2caa5c2743.53
    13
    0x6bdb6c1f9607145805e0ebec0314dad541a325d12669.21
    14
    0x4e5ef61c94987f4c2e21496044870d986f85df442502.551
    15
    0xc12b92d2b1a7ccfa47b45a0460d63b28a42ab6082390.722
    16
    0x833baf1f87f158798f062ecce615fa576481b12a2353.7932
    17
    0x0cbcbe6a10c3b6b1768877cf30bc81507f068d3c2327.621
    18
    0x6309f3dae3ab1d63ff13bcfbf24be1311396002b1980.417
    19
    0xcd2829210dbe5110bf82e3e47ec99bf2938ea7601546.9283066676
    20
    0xe7e0bb6aaf7d5bddec5b302c00e91e565819b8d11438.612
    ...
    352
    19KB
    12s