HosseinUntitled Query
Updated 2022-10-24
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
›
⌄
with price_daily_list as (
select timestamp::date "Date", avg(price_usd) "Price"
from flow.core.fact_prices
where symbol = 'FLOW'
group by timestamp::date
)
select
"Date",
nft_collection "NFT Collection",
count(distinct(tx_id)) "Transaction Number (Sales Number)",
sum (case when currency <> ('A.1654653399040a61.FlowToken') then price else price * "Price" end) "Total Volume (USD)",
avg (case when currency <> ('A.1654653399040a61.FlowToken') then price else price * "Price" end) "Average Sale Price (USD)",
count(distinct (nft_id)) "Number of NFTs",
count(distinct (buyer)) "Number of Buyers"
from flow.core.fact_nft_sales
join price_daily_list on "Date" = date_trunc('day', flow.core.fact_nft_sales.block_timestamp)
where (
nft_collection = 'A.329feb3ab062d289.RaceDay_NFT' OR
nft_collection = 'A.0b2a3299cc857e29.TopShot'
)
and tx_succeeded = 1
group by 1, 2
Run a query to Download Data