permaryHolder analysis
Updated 2024-11-20
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 token_holders as (
select
to_address as holder,
sum(amount) as total_received,
count(distinct tx_hash) as receive_transactions
from mantle.core.ez_token_transfers
where
contract_address = lower('0x9F0C013016E8656bC256f948CD4B79ab25c7b94D')
group by 1
),
token_senders as (
select
from_address as holder,
sum(amount) as total_sent,
count(distinct tx_hash) as send_transactions
from mantle.core.ez_token_transfers
where
contract_address = lower('0x9F0C013016E8656bC256f948CD4B79ab25c7b94D')
group by 1
),
holder_balances as (
select
coalesce(r.holder, s.holder) as address,
coalesce(r.total_received, 0) as total_received,
coalesce(s.total_sent, 0) as total_sent,
coalesce(r.total_received, 0) - coalesce(s.total_sent, 0) as net_balance,
coalesce(r.receive_transactions, 0) as receive_transactions,
coalesce(s.send_transactions, 0) as send_transactions
from token_holders r
full outer join token_senders s on r.holder = s.holder
)
select
address,
net_balance,
total_received,
total_sent,
QueryRunArchived: QueryRun has been archived