abaplay_types holders
Updated 2022-07-25
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 play_type_hold as (
select PLAY_TYPE, m.NFT_ID, datediff(day,max(s.BLOCK_TIMESTAMP), CURRENT_DATE) hold_days
from flow.core.dim_topshot_metadata m
join flow.core.fact_nft_sales s USING(NFT_ID)
group by 1,2
)
, all_holders as (
select PLAY_TYPE, count(distinct NFT_ID) number_of_holders
from play_type_hold
where hold_days > 0
group by 1
)
, holders_atleast_30_days as (
select PLAY_TYPE, count(distinct NFT_ID) number_of_holders
from play_type_hold
where hold_days >= 30
group by 1
)
, holders_atleast_60_days as (
select PLAY_TYPE, count(distinct NFT_ID) number_of_holders
from play_type_hold
where hold_days >= 60
group by 1
)
, holders_atleast_90_days as (
select PLAY_TYPE, count(distinct NFT_ID) number_of_holders
from play_type_hold
where hold_days >= 90
group by 1
)
select a.PLAY_TYPE,
a.number_of_holders all_holders,
th.number_of_holders atleast_30_days,
s.number_of_holders atleast_60_days,
n.number_of_holders atleast_90_days
from all_holders a
Run a query to Download Data