0xaimanmonkeDAO whale voters yes
Updated 2022-04-19
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
›
⌄
select category, count(distinct address) as n_address
from (with
--smb purchaser table
sp as (with
a as (select distinct mint from solana.dim_nft_metadata where project_name='Solana Monkey Business'),
b as (select purchaser,mint,tx_id from solana.fact_nft_sales where succeeded = true and block_timestamp <= '2022-03-05')
select purchaser, tx_id from a inner join b on a.mint=b.mint),
--yes voter table
va as ( with a as ( SELECT
instructions[0]:accounts[0] as a, instructions[0]:accounts[1] as b, instructions[0]:accounts[2] as c, instructions[0]:accounts[3] as d, instructions[0]:accounts[4] as e, instructions[0]:accounts[5] as f, instructions[0]:accounts[6] as g
FROM
solana.fact_transactions
WHERE
block_timestamp <= '2022-03-05'
AND block_timestamp >= '2022-02-15'
AND succeeded = 'True'
AND instructions[0]:programId = 'Daovoteq2Y28gJyme6TNUXT9TxXrePiouFuHezkiozci'
AND instructions[0]:data ='Yjf5DvKUCfa2bPkYz4AiWs' )
select distinct a from a union
select distinct b from a union
select distinct c from a union
select distinct d from a union
select distinct e from a union
select distinct f from a union
select distinct g from a )
select purchaser as address, count (distinct tx_id) as n_smb_nft, case when n_smb_nft=1 then 'Fish'
when n_smb_nft>1 and n_smb_nft<5 then 'Shark' else 'Whale' end as Category
from sp inner join va on sp.purchaser=va.a group by 1 order by 2 desc )
group by 1
Run a query to Download Data