ArioFlow Holders - label
Updated 2022-11-29Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with inflow as (
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
),
outflow as (
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
),
Holders as (
select
User_address,
sum(inflows-Outflows) as Flow_Balance
from inflow outer join outflow using(User_address)
where User_address != 'null'
group by 1
having Flow_Balance > 0.1
order by 2 desc
)
select
Top 20 User_address::string as Wallet,
ADDRESS_NAME as Label,
Flow_Balance
from Holders a join crosschain.core.address_labels b on a.user_address = b.address
Run a query to Download Data