brokkrCurrent BRO holders
    Updated 2023-07-11
    with inflow (deposits, to_address) as (
    select sum(raw_amount)/1000000000000000000 as deposits, to_address from avalanche.core.fact_token_transfers
    where CONTRACT_ADDRESS = '0x65031e28cb0e8cc21ae411f9dd22c9b1bd260ce4'
    and (to_address != '0xda332c26aae7868a16d5cda6f0e91001938ad9a2'
    AND to_address != '0xeb189363dfa04dc79cbf978ce4438985f5059511'
    AND to_address != '0x78bd81bff41f060603f29fd87836662edbe6e75d'
    AND to_address != '0xaa91c112c47a839bf0f237c0cb592bc98dea0674'
    AND to_address != '0xe146928d46b7b3f0b283bff143fb09aa0efa209d'
    AND to_address != '0xde971dac0009dfb373acee32f94777af2e38e56c'
    AND to_address != '0x651bb61beb931588e6392fc93c56ed2cd238d29b'
    AND to_address != '0x71759623d91c17f0d5f90cf7ef6829ce33f8a697'
    AND to_address != '0xe8855828fec29dc6860a4362bcb386ccf6c0c601'
    AND to_address != '0x8648a547d92da409cf8682212d9549c3f1eba9e7'
    and to_address != '0xecbaed801370d5f5cce3f6313470e59f7aa212dc'
    and to_address != '0x03d2c0b2ee66493e8881c3b7ab1de74fd8e99d5c'
    and to_address != '0xa3a54fe9231d61d7afa57c92db6b669f86a33ebd')
    group by to_address),
    outflow (withdrawals, from_address) as (
    select sum(raw_amount)/1000000000000000000 as withdrawals, from_address from avalanche.core.fact_token_transfers
    where CONTRACT_ADDRESS = '0x65031e28cb0e8cc21ae411f9dd22c9b1bd260ce4'
    group by from_address),
    x (totals, to_address) as (select COALESCE(deposits,0 )-COALESCE(withdrawals, 0) as totals, to_address from inflow full join outflow on inflow.to_address = outflow.from_address)

    select count(totals) from x where totals > 0

    --bro token address 0x65031e28cb0e8cc21ae411f9dd22c9b1bd260ce4
    Run a query to Download Data