adambalaUntitled Query
Updated 2022-12-05Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
›
⌄
-- credit by SOHΞIL
select
BLOCK_TIMESTAMP::date as date,
CASE
when BLOCK_TIMESTAMP >'2022-11-24' then 'Thanksgiving week'
else 'normal days'
end as days,
sum(PRICE) as volume,
avg (volume) over (order by date rows between 7 preceding and current row) as Mv_avg_7,
avg (volume) over (order by date rows between 60 preceding and current row) as Mv_avg_60,
avg (volume) over (order by date rows between 365 preceding and current row) as Mv_avg_365
from flow.core.ez_nft_sales
where NFT_COLLECTION ='A.e4cf4bdc1751c65d.AllDay'
and currency='A.ead892083b3e2c6c.DapperUtilityCoin'
and TX_SUCCEEDED ='TRUE'
and date>='2022-10-01'
group by 1,2
Run a query to Download Data