yasmin-n-d-r-hUntitled Query
Updated 2022-07-19
99
1
2
3
4
5
6
7
8
9
10
›
⌄
with flow_nft_sales as (select
block_timestamp,nft_id as mint,buyer as purchaser,
lag(buyer, 1) ignore nulls over (partition by mint order by block_timestamp asc) as seller,
lag(block_timestamp, 1) ignore nulls over (partition by mint order by block_timestamp asc) as buy_date,
block_timestamp as sell_date,
datediff('day',buy_date,sell_date) as n_days_held
from flow.core.fact_nft_sales
where block_timestamp >= '2022-01-01'
order by mint,block_timestamp
)select (select avg(n_days_held) from flow_nft_sales) as flow_avg_n_days_held
Run a query to Download Data