mlhUntitled Query
Updated 2022-07-24Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
select a.play_type,
count(distinct b.buyer) as buyers,
round(sum(b.price),2) as volume,
count(distinct b.tx_id) as trxs
from flow.core.dim_topshot_metadata a
inner join flow.core.fact_nft_sales b on a.nft_id = b.nft_id
where split_part(b.nft_collection, '.', 3) = 'TopShot'
and b.buyer in (select users
from (
select date_trunc('day', date) as days,
users
from (select min(block_timestamp) as date,
buyer as users
from flow.core.fact_nft_sales
where split_part(nft_collection, '.', 3) = 'TopShot'
group by users
)
having days >= current_date - 30
)
)
GROUP by 1
ORDER BY 1
Run a query to Download Data