mattkstewTop Play Type 4
Updated 2022-07-21
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
›
⌄
with tab1 as (
select
play_type,
count(*)
from flow.core.fact_nft_sales left outer join flow.core.dim_topshot_metadata
on flow.core.fact_nft_sales.nft_id = flow.core.dim_topshot_metadata.nft_id
where flow.core.fact_nft_sales.nft_collection like '%TopShot%'
and play_type is not null
group by 1
order by 2 DESC
limit 10 )
select
date_trunc('day', block_timestamp),
play_type,
count(*)
from flow.core.fact_nft_sales left outer join flow.core.dim_topshot_metadata
on flow.core.fact_nft_sales.nft_id = flow.core.dim_topshot_metadata.nft_id
where flow.core.fact_nft_sales.nft_collection like '%TopShot%'
and play_type is not null
and play_type in (select play_type from tab1)
group by 1,2