bergUntitled Query
Updated 2022-10-22Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
with tab1 as (
select
block_timestamp::date as day,
sum(price) as volume,
avg(price) as avg_price,
median(price) as median_price,
count(DISTINCT tx_id) as sales_events,
count(DISTINCT buyer) as buyers
from flow.core.ez_nft_sales
where nft_collection = 'A.329feb3ab062d289.RaceDay_NFT'
group by day
)
SELECT *,
avg(avg_price) over(order by day rows between 7 preceding and current row) as price_moving_avg
from tab1
Run a query to Download Data