web3gameguidesUntitled Query
    Updated 2023-04-20

    SELECT
    participant_id
    , event_timestamp
    , LEAD(event_timestamp, 1) OVER (PARTITION BY nft_id order by event_timestamp asc) as next_event_timestamp
    , DATEDIFF(minute, event_timestamp, LEAD(event_timestamp, 1) OVER (PARTITION BY nft_id order by event_timestamp asc) ) as time_spent
    FROM #tmp_participants
    ORDER BY flow.nft_id, event_timestamp asc


    SELECT Top 1000
    nft_id
    , event_timestamp
    , LEAD(event_timestamp, 1) OVER (PARTITION BY nft_id order by event_timestamp asc) as next_event_timestamp
    , DATEDIFF(minute, event_timestamp, LEAD(event_timestamp, 1) OVER (PARTITION BY nft_id order by event_timestamp asc) ) as time_spent
    FROM (SELECT nft_id, LEAD(event_timestamp, 1) OVER (PARTITION BY nft_id order by event_timestamp asc) as next_event_timestamp
    FROM flow.core.ez_nft_sales flow) as subquery
    ORDER BY flow.nft_id, event_timestamp asc
    Run a query to Download Data