hessTotal and New
Updated 2024-09-10
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 sales as ( select trunc(block_timestamp,'hour') as hourly,
tx_id,
buyer,
seller,
nft_id,
nft_collection,
case when nft_collection = 'A.0b2a3299cc857e29.TopShot' then 'NBA Top Shot'
when nft_collection = 'A.329feb3ab062d289.UFC_NFT' then 'UFC Strike'
when nft_collection = 'A.329feb3ab062d289.NFL_NFT' then 'NFL AllDay'
when nft_collection = 'A.87ca73a41bb50ad5.Golazos' then 'La Liga Golazos'
when nft_collection = 'A.4eded0de73020ca5.CricketMoments' then 'Cricket (Fancraze)'
when nft_collection = 'A.eee6bdee2b2bdfc8.Basketballs' then 'Basketballs'
when nft_collection = 'A.329feb3ab062d289.RaceDay_NFT' then 'Race Day' else nft_collection end as collection,
price,
CURRENCY
from flow.nft.ez_nft_sales
where TX_SUCCEEDED = 'TRUE'
and nft_collection in ('A.329feb3ab062d289.UFC_NFT'))
,
new as ( select min(hourly::date) as day,
buyer
from sales
group by 2)
,
final as (select day,
count(DISTINCT buyer) as new_buyers,
sum(new_buyers) over (order by day asc) as cum_new_buyers
from new
where day >= '2023-01-01'
group by 1 )
select sum(new_buyers) as new,
avg(new_buyers) as avg
from final
QueryRunArchived: QueryRun has been archived