SpiltadavidAverage Sales volume ($USD) - Daily Visual
Updated 2022-10-24Copy Reference Fork
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 Price as (
select
date_trunc('day', TIMESTAMP) as date,
avg (price_usd) as price
from
flow.core.fact_prices
where
source = 'coinmarketcap'
and symbol = 'FLOW'
group by
1
),
Data as (
select
NFTs_Sales.block_timestamp as sale_day,
buyer,
nft_id,
case
when currency = 'A.1654653399040a61.FlowToken' then Price.price * NFTs_Sales.price
else NFTs_Sales.price
end as price
from
flow.core.ez_nft_sales NFTs_Sales
join Price on (
date_trunc('day', NFTs_Sales.block_timestamp) = price.date
)
where
nft_collection ilike 'A.329feb3ab062d289.RaceDay_NFT'
and tx_succeeded = 'TRUE'
)
select
sum (price) as "Total Sales Volume ($USD)",
sum (price) / count(DISTINCT (date_trunc('day', sale_day :: date))) as "Average Sales volume ($USD) - Daily",
sum (price) / count(DISTINCT (date_trunc('week', sale_day :: date))) as "Average Sales volume ($USD) - Weekly",
sum (price) / count(DISTINCT (date_trunc('month', sale_day :: date))) as "Average Sales volume ($USD) - Monthly",
count (distinct buyer) as "Total Unique Buyers",
Run a query to Download Data