Updated 2022-11-28Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
›
⌄
with table1 as (SELECT RECIPIENT as user_in, sum(amount) as amount_in
FROM flow.core.ez_token_transfers WHERE token_contract ilike 'A.1654653399040a61.FlowToken'
GROUP BY 1),
table2 as (select sender as user_out, sum(amount) as amount_out
FROM flow.core.ez_token_transfers WHERE token_contract ilike 'A.1654653399040a61.FlowToken'
GROUP BY 1)
select user_in as FLOW_user, sum(amount_in - amount_out) as net_amount
from table1 join table2 where user_in = user_out
group by 1
order by 2
desc limit 10
Run a query to Download Data