0xaimanhvjbhbjknjhnihuhi
Updated 2022-11-29
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
›
⌄
with a as (select *, inner_instructions[1]:instructions[3]:accounts[12] from solana.core.fact_transactions
where inner_instructions[1]:instructions[3]:accounts[12]= 'yootn8Kf22CQczC732psp7qEqxwPGSDQCFZHkzoXp25'),
b as ( select mint from solana.core.fact_nft_mints m
inner join a on a.tx_id=m.tx_id),
c as (select trf.* from solana.core.fact_transfers trf
inner join b on b.mint=trf.mint),
d as (select mint, max(block_timestamp) as tm
from c
group by 1)
select case when n_y00ts_nft_hold<=5 then 'Owns 1 to 5 y00ts NFT'
when n_y00ts_nft_hold>5 and n_y00ts_nft_hold<=10 then 'Owns 6 to 10 y00ts NFT'
when n_y00ts_nft_hold>10 and n_y00ts_nft_hold<=25 then 'Owns 11 to 25 y00ts NFT'
when n_y00ts_nft_hold>25 and n_y00ts_nft_hold<=50 then 'Owns 26 to 50 y00ts NFT'
when n_y00ts_nft_hold>50 then 'Owns more than 50 y00ts NFT' end as holdings, count(distinct tx_to) as n_unique_holders
from (select TX_TO, count( distinct d.mint) as n_y00ts_nft_hold
from c inner join d on c.block_timestamp=d.tm
group by 1 order by 2 desc)
group by 1
Run a query to Download Data