mlhWallets label with highest balance of $Flow
    Updated 2022-11-29
    select ADDRESS_NAME as Label,
    Flow_Balance
    from (select User_address,
    sum(inflows-Outflows) as Flow_Balance
    from (select RECIPIENT as user_address,
    sum(AMOUNT::float) as inflows
    from flow.core.ez_token_transfers
    where TOKEN_CONTRACT = 'A.1654653399040a61.FlowToken'
    and AMOUNT::float > 0
    and tx_succeeded = 'TRUE'
    group by 1
    ) outer join (select SENDER as User_address,
    sum(AMOUNT::float) as Outflows
    from flow.core.ez_token_transfers
    where 1=1
    and TOKEN_CONTRACT = 'A.1654653399040a61.FlowToken'
    and amount::float > 0
    and tx_succeeded = 'TRUE'
    group by 1
    )
    using(User_address)
    where User_address != 'null'
    group by 1
    having Flow_Balance > 0.1
    order by 2 desc
    ) a join crosschain.core.address_labels b on a.user_address = b.address
    group by 1,2
    order by 2 desc
    limit 20
    Run a query to Download Data