Ali3NDistribution of Swappers By Their AVAX Balance and Number of Swaps on Pangolin (Avalanche Pangolin)
    Updated 9 hours ago
    with timetable as (
    select case when '{{TimeFrame}}' = 'Last 7 Days' then 7
    when '{{TimeFrame}}' = 'Last 30 Days' then 30
    when '{{TimeFrame}}' = 'Last 60 Days' then 60
    when '{{TimeFrame}}' = 'Last 90 Days' then 90
    when '{{TimeFrame}}' = 'Last 180 Days' then 180
    when '{{TimeFrame}}' = 'Last 365 Days' then 365
    when '{{TimeFrame}}' = 'All Time' then 5000
    else 5000 end as timeframe),

    maintable as (
    select origin_from_address,
    count (distinct tx_hash) as Swaps_Count
    from avalanche.defi.ez_dex_swaps t1
    join timetable
    where platform = 'pangolin'
    and block_timestamp >= CURRENT_DATE - timeframe
    group by 1),

    receivetable as (
    select to_address as receiver,
    sum (amount) as Received_Volume
    from avalanche.core.ez_native_transfers
    where to_address in (select distinct origin_from_address from maintable)
    group by 1),

    sendtable as (
    select from_address as sender,
    sum (amount) as sent_volume
    from avalanche.core.ez_native_transfers
    where from_address in (select distinct origin_from_address from maintable)
    group by 1),

    balancetable as (
    select sender as AVAX_Holder,
    sum (received_volume - sent_volume) as Avax_Balance
    Last run: about 9 hours agoAuto-refreshes every 12 hours
    TYPE
    TYPE1
    COUNT (DISTINCT AVAX_HOLDER)
    1
    < 1 $AVAX1 Swap614989
    2
    < 1 $AVAX2 - 5 Swaps221078
    3
    1 - 10 $AVAX2 - 5 Swaps53391
    4
    1 - 10 $AVAX1 Swap39575
    5
    1 - 10 $AVAX11 - 50 Swaps33000
    6
    < 1 $AVAX6 - 10 Swaps29561
    7
    1 - 10 $AVAX6 - 10 Swaps22296
    8
    < 1 $AVAX11 - 50 Swaps14538
    9
    10 - 100 $AVAX2 - 5 Swaps9036
    10
    10 - 100 $AVAX11 - 50 Swaps8976
    11
    10 - 100 $AVAX1 Swap6839
    12
    1 - 10 $AVAX51 - 100 Swaps4344
    13
    10 - 100 $AVAX6 - 10 Swaps4078
    14
    10 - 100 $AVAX> 100 Swaps4058
    15
    10 - 100 $AVAX51 - 100 Swaps3263
    16
    1 - 10 $AVAX> 100 Swaps1978
    17
    100 - 1000 $AVAX2 - 5 Swaps1267
    18
    100 - 1000 $AVAX> 100 Swaps1262
    19
    100 - 1000 $AVAX1 Swap1058
    20
    100 - 1000 $AVAX11 - 50 Swaps979
    30
    1KB
    28s