adambalaNumber of Holders based on theirs NFT
Updated 2022-12-09
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
a as (
select
nft_to_address as wallets,
'1' as flag
FROM ethereum.core.ez_nft_transfers
where (nft_address =lower('0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d')
)
union all
SELECT
nft_from_address as wallets,
'-1' as flag
FROM ethereum.core.ez_nft_transfers
where (nft_address =lower('0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d')
)
),
b as (
select
wallets ,
sum(flag) as nfts
from a
group by 1
having 2 > 0
order by 2 desc)
select
count(distinct wallets) as users,
case
when nfts = 1 then '1'
when nfts = 2 then '2'
when nfts = 3 then '3'
Run a query to Download Data