shadilThe Octorand Universe - holders
Updated 2022-05-24
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 gen1 as (
SELECT ASSET_ID from flipside_prod_db.algorand.asset
where ASSET_NAME ilike 'Octorand #%'
and ASSET_DELETED = FALSE
and CLOSED_AT is NULL
GROUP BY ASSET_ID
),
gen2 as (
SELECT ASSET_ID from flipside_prod_db.algorand.asset
where asset_name ilike '%Octo Prime Gen2%'
and ASSET_DELETED = FALSE
and CLOSED_AT is NULL
GROUP BY ASSET_ID
),
gen2_holders as (
SELECT ADDRESS, sum(amount)
from flipside_prod_db.algorand.account_asset
where asset_id in (SELECT * from gen2)
and amount > 0
and ASSET_CLOSED = FALSE
GROUP BY ADDRESS
),
gen1_holdres as (
SELECT ADDRESS
from flipside_prod_db.algorand.account_asset
where asset_id in (SELECT * from gen1)
and amount > 0
GROUP BY ADDRESS
), -- How many Gen2 holders hold an Oct Prime Gen1?
gen1_and_2_holdres as (
SELECT ADDRESS
from gen1_holdres
where address in (SELECT address from gen2_holders)
GROUP BY ADDRESS
)
Run a query to Download Data