ArioFlow Holders - 1
Updated 2024-05-10Copy 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
),
joint as (
select
User_address,
sum(inflows-Outflows) as Flow_Balance
from inflow join outflow using(User_address)
where User_address != 'null'
group by 1
having Flow_Balance > 0.1
order by 2 desc
--limit 1000
),
all_wallets as (
SELECT
count(distinct user_address) as "# All Wallets"
from (select User_address from Inflow
QueryRunArchived: QueryRun has been archived