Ali3NavUSD Holders and Balance on Avalanche
    Updated 8 days ago
    with receivet as (
    select to_address as Receiver,
    sum (amount) as Received_Volume
    from avalanche.core.ez_token_transfers
    where contract_address = '0x24de8771bc5ddb3362db529fc3358f2df3a0e346'
    group by 1),

    sendt as (
    select from_address as sender,
    sum (amount) as sent_volume
    from avalanche.core.ez_token_transfers
    where contract_address = '0x24de8771bc5ddb3362db529fc3358f2df3a0e346'
    group by 1),

    balancetable as (
    select coalesce (t1.Receiver,t2.sender) as Holder,
    sum (coalesce (Received_Volume, 0) - coalesce (sent_volume, 0)) as Balance
    from receivet t1 full outer join sendt t2 on t1.receiver = t2.sender
    group by 1)

    select count (distinct holder) as Holders_Count,
    avg (balance) as Average_Balance,
    median (balance) as Median_Balance,
    max (balance) as Maximum_Balance
    from balancetable
    where balance > 0





    Last run: 8 days agoAuto-refreshes every 24 hours
    HOLDERS_COUNT
    AVERAGE_BALANCE
    MEDIAN_BALANCE
    MAXIMUM_BALANCE
    1
    80942952.1623709780.844918530529952873.4446103
    1
    53B
    156s