This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH events AS ( | |
SELECT domain_userid, | |
network_userid, | |
collector_tstamp, | |
page_urlpath, | |
dvce_type, | |
user_id, | |
LAG(collector_tstamp, 1) OVER (PARTITION BY domain_userid ORDER BY collector_tstamp) AS last_event | |
FROM snowplow_atomic.events | |
WHERE event = 'page_view' |