MLDZMNft4
Updated 2022-10-27Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
select--flow nft
BLOCK_TIMESTAMP::date as day,
CONTRACT_NAME as NFTs,
avg(price) as avg_sale,
avg(avg_sale) OVER (partition by NFTs ORDER BY day ROWS BETWEEN 7 PRECEDING AND CURRENT ROW) as MA_7_Days,
median(price) as med_price,
min(price) as min_price,
max(price) as max_price,
max_price-min_price as bond_price
from flow.core.fact_nft_sales s left join flow.core.dim_contract_labels b on s.NFT_COLLECTION=b.EVENT_CONTRACT
where TX_SUCCEEDED='TRUE' and CURRENCY='A.ead892083b3e2c6c.DapperUtilityCoin'
and NFTs = ('{{NFT_collection}}')
and BLOCK_TIMESTAMP>=CURRENT_DATE- {{Time_period}}
group by 1,2
Run a query to Download Data