mehrancrypto-dxoepqQ71-4
Updated 2022-10-23
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
›
⌄
with tab0 as ( SELECT BUYER as buyers
from flow.core.ez_nft_sales
where NFT_COLLECTION ilike '%raceday%'
and TX_SUCCEEDED ilike '%TRUE%'
) ,
tab1 as (
SELECT nft_id , max(block_timestamp) as last_sale
from flow.core.ez_nft_sales A, tab0 B
where TX_SUCCEEDED ilike '%TRUE%'
and buyers = buyer
GROUP by 1
)
SELECT buyer ,
case
when NFT_COLLECTION = 'A.329feb3ab062d289.RaceDay_NFT' then 'RaceDay'
else 'Other NFTs'
end as type ,
count(A.nft_id) as number
from tab1 A , flow.core.ez_nft_sales B
where TX_SUCCEEDED ilike '%TRUE%'
and last_sale = block_timestamp
and A.nft_id = B.nft_id
GROUP by 1 , 2
Run a query to Download Data