drone-mostafaUntitled Query
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
24
25
26
27
28
29
›
⌄
with nfl as (
select
date_trunc('week',BLOCK_TIMESTAMP::date) as weekly,
count(TX_ID) as nfl_tx_count,
count(distinct BUYER) as "NFL Buyers",
sum(PRICE) as "NFL Sales Amount"
from flow.core.fact_nft_sales
where TX_SUCCEEDED = true
and marketplace = 'A.4eb8a10cb9f87357.NFTStorefront'
and nft_collection in ('A.e4cf4bdc1751c65d.PackNFT','A.e4cf4bdc1751c65d.AllDay')
and weekly >= '2022-01-01'
group by 1
order by 1),
shot as (
select
date_trunc('week',BLOCK_TIMESTAMP::date) as weekly,
count(TX_ID) as top_tx_count,
count(distinct BUYER) as "Top Shot Buyers",
sum(PRICE) as "NBA Top Shot Sales Amount"
from flow.core.fact_nft_sales
where TX_SUCCEEDED = true
and marketplace = 'A.c1e4f4f4c4257510.TopShotMarketV3'
and weekly >= '2022-01-01'
group by 1
order by 1)
select nfl.weekly, nfl."NFL Buyers",nfl."NFL Sales Amount",shot."Top Shot Buyers",shot."NBA Top Shot Sales Amount"
from nfl
join shot on shot.weekly=nfl.weekly
order by 1
Run a query to Download Data