HadisehNFL All Day
Updated 2022-07-03
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with flow_price as ( select trunc(TIMESTAMP,'day') as p_day , avg(price_usd) as fact_prices
from flow.core.fact_prices
where token = 'Flow'
group by p_day),
type as ( select trunc(block_timestamp,'day') as day , MARKETPLACE , NFT_COLLECTION , tx_id , BUYER , SELLER , price
from flow.core.fact_nft_sales
where MARKETPLACE in ('A.c1e4f4f4c4257510.TopShotMarketV3' , 'A.4eb8a10cb9f87357.NFTStorefront')
),
t1 as ( select day , nft_collection , count( DISTINCT tx_id) as sales_count , sum(s.price) as amount , sum(s.price*d.fact_prices) as volume
from type s left outer join flow_price d on s.day = d.p_day
where nft_collection = 'A.e4cf4bdc1751c65d.AllDay'
group By 1,2),
t2 as ( select day , nft_collection , count( DISTINCT tx_id) as sales_count , sum(s.price) as amount , sum(s.price*d.fact_prices) as volume
from type s left outer join flow_price d on s.day = d.p_day
where nft_collection = 'A.0b2a3299cc857e29.TopShot'
group By 1,2)
select 'All Day' as type, * from t1
UNION
select 'Top Shots' as type , * from t2
Run a query to Download Data