0xbrun0winr holders dev
Updated 2023-04-02
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
›
⌄
⌄
/*
Can do better here probably using union all and sum amount with sign grouping by adress
Also filter out contracts holders maybe
*/
with
inflows as (
select
to_address as user_address,
sum(raw_amount / 1e18) as amount_in
from
arbitrum.core.fact_token_transfers
where
contract_address = lower('0xD77B108d4f6cefaa0Cae9506A934e825BEccA46E')
group by
user_address
),
outflows as (
select
from_address as user_address,
sum(raw_amount / 1e18) as amount_out
from
arbitrum.core.fact_token_transfers
where
contract_address = lower('0xD77B108d4f6cefaa0Cae9506A934e825BEccA46E')
group by
user_address
)
select
inf.user_address, amount_in - amount_out as amount,
outf.user_address
from
inflows inf full join outflows outf on inf.user_address = outf.user_address
order by amount desc
Run a query to Download Data