mlhTop 10 holders with highest balance of $Flow
    Updated 2022-11-29
    select flowuser as holders,
    Balance
    from (select a.flowuser,
    sum (deposit_volume - withdraw_volume) as Balance
    from (select event_data:to as flowuser,
    sum (event_data:amount) as Deposit_Volume
    from flow.core.fact_events
    where event_contract = 'A.1654653399040a61.FlowToken'
    and event_type = 'TokensDeposited'
    and tx_succeeded = 'TRUE'
    group by 1) a join (select event_data:from as flowuser,
    sum (event_data:amount) as Withdraw_Volume
    from flow.core.fact_events
    where event_contract = 'A.1654653399040a61.FlowToken'
    and event_type = 'TokensWithdrawn'
    and tx_succeeded = 'TRUE'
    group by 1) b on a.flowuser = b.flowuser
    where a.flowuser != 'null'
    group by 1
    )
    order by 2 DESC
    limit 10
    Run a query to Download Data