NavidCopy of Untitled Query
Updated 2022-10-23Copy 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
23
24
25
26
27
28
29
30
31
32
33
›
⌄
with sells as (
select
block_timestamp,
concat(NFT_COLLECTION, '-', NFT_ID) as tokenid,
BUYER,
lead(BUYER) over (partition by NFT_COLLECTION, NFT_ID order by block_timestamp asc) as next_buyer
from
flow.core.ez_nft_sales
where
NFT_COLLECTION like '%RaceDay%'
order by
block_timestamp asc
), last_buyers as (
select
*
from
sells
where next_buyer is null
), buyers_asset as (
select
BUYER,
count(*) as number_of_current_tokens
from
last_buyers
group by
buyer
)
select
number_of_current_tokens,
count(*) as cnt
from buyers_asset
group by number_of_current_tokens
order by number_of_current_tokens asc
Run a query to Download Data