kiacryptoTop 25 Flow addresses that hold the most $FLOW
    Updated 2022-11-28
    with balance as (
    select
    event_data:to as address,
    sum(event_data:amount) as volume
    from flow.core.fact_events
    where
    event_contract = 'A.1654653399040a61.FlowToken' and
    event_type = 'TokensDeposited' and
    tx_succeeded = 'TRUE' and
    event_data:to != 'null' and
    event_data:amount is not null
    group by 1

    union all
    select
    event_data:from as address,
    -sum(event_data:amount) as volume
    from flow.core.fact_events
    where
    event_contract = 'A.1654653399040a61.FlowToken' and
    event_type = 'TokensWithdrawn' and
    tx_succeeded = 'TRUE' and
    event_data:from != 'null' and
    event_data:amount is not null
    group by 1
    )

    select
    address,
    right(address, 5) as "Short Address",
    sum(volume) as balance
    from balance
    group by address
    order by balance desc
    limit 25
    Run a query to Download Data