saeedmznNFL All Day - allday vs topshot
Updated 2022-07-01
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 NFallDay as (
select EVENT_CONTRACT, CONTRACT_NAME
from flow.core.dim_contract_labels
where contract_name ='AllDay'
group by 1,2
),
TopsShot as (
select EVENT_CONTRACT, CONTRACT_NAME
from flow.core.dim_contract_labels
where contract_name ='TopShot'
group by 1,2
),
ALLday as (
select
BLOCK_TIMESTAMP::date as date ,
count (DISTINCT BUYER) as num_buyers,
count (DISTINCT SELLER ) as num_sellers ,
count (DISTINCT TX_ID) as num_sales ,
sum (num_sales) over (order by date ) as cum_sales ,
sum (PRICE) as volume,
sum (volume) over (order by date) as cum_volume
from flow.core.fact_nft_sales
where NFT_COLLECTION in (select EVENT_CONTRACT from NFallDay )
and tx_succeeded =true
group by 1
),
Topshot as (
select BLOCK_TIMESTAMP::date as date ,
count (DISTINCT BUYER) as num_buyers,
count (DISTINCT SELLER ) as num_sellers ,
count (DISTINCT TX_ID) as num_sales ,
sum (num_sales) over (order by date ) as cum_sales ,
sum (PRICE) as volume,
sum (volume) over (order by date) as cum_volume
from flow.core.fact_nft_sales
where NFT_COLLECTION in (select EVENT_CONTRACT from TopsShot )
Run a query to Download Data