Total Note Holders | |
---|---|
1 | 7408 |
datavortexTotal NOTE Holders
Updated 2025-04-16Copy 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
›
⌄
WITH transfers AS (
SELECT
LOWER('0x' || SUBSTR(topics[1], 27)) AS from_address,
LOWER('0x' || SUBSTR(topics[2], 27)) AS to_address,
CAST(ethereum.public.udf_hex_to_int(SUBSTRING(data, 3, 64)) AS FLOAT) / POWER(10, 8) AS amount
FROM avalanche.core.ez_decoded_event_logs
WHERE event_name = 'Transfer'
AND contract_address = LOWER('0x7c6a937943f135283a2561938de2200994a8f7a7')
),
address_balances AS (
SELECT
address,
SUM(CASE WHEN direction = 'in' THEN amount ELSE -amount END) AS balance
FROM (
SELECT to_address AS address, amount, 'in' AS direction
FROM transfers
WHERE to_address != '0x0000000000000000000000000000000000000000'
UNION ALL
SELECT from_address AS address, amount, 'out' AS direction
FROM transfers
WHERE from_address != '0x0000000000000000000000000000000000000000'
) t
GROUP BY address
HAVING balance > 0
)
SELECT
COUNT(DISTINCT address) AS "Total Note Holders"
FROM address_balances;
Last run: 2 months ago
1
8B
10s