web3gameguidesUntitled Query
Updated 2023-04-20
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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