ZNS balance | USERS | |
---|---|---|
1 | A) 1 domain | 40652 |
2 | B) 2~4 domains | 1132 |
3 | C) 5~9 domains | 17 |
4 | D) +10 domains | 8 |
Hessishzink - usr dist
Updated 2025-04-17
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 all_actions as (SELECT BLOCK_TIMESTAMP,
'0x'||SUBSTRING(TOPICS[2], 27) as receiver,
ethereum.public.udf_hex_to_int(topics[3]) as token_id ,TX_HASH
from ink.core.fact_event_logs
WHERE
CONTRACT_ADDRESS = lower('0xFb2Cd41a8aeC89EFBb19575C6c48d872cE97A0A5') and
TOPICS[0] = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
and TX_SUCCEEDED = 'TRUE'
),
owenrs as (select token_id, receiver
from (
select distinct token_id, receiver,
row_number() over (partition by token_id order by BLOCK_TIMESTAMP desc) as rn
from all_actions
) as ranked_actions
where rn = 1),
final as (select distinct receiver as user ,count(distinct token_id) as "ZNS balance"
from owenrs
group by 1 )
select case
when "ZNS balance" = 1 then 'A) 1 domain'
when "ZNS balance" > 1 and "ZNS balance" < 5 then 'B) 2~4 domains'
when "ZNS balance" >= 5 and "ZNS balance" < 10 then 'C) 5~9 domains'
when "ZNS balance" >= 10 then 'D) +10 domains' end as "ZNS balance",
count(DISTINCT user) as users
from final
group by all
order by 1
Last run: 11 days ago
4
90B
42s