yasmin-n-d-r-hUntitled Query
    Updated 2022-07-19
    with ethereum_nft_sales as (select
    block_timestamp,
    nft_address as mint,
    buyer_address as purchaser,
    lag(buyer_address, 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 ethereum.core.ez_nft_sales
    where block_timestamp >= '2022-01-01'
    order by mint,block_timestamp
    )select (select avg(n_days_held) from ethereum_nft_sales) as ethereum_avg_n_days_held
    Run a query to Download Data