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
{ | |
"data": { | |
"headline": "Roadrunner spotted in Albuquerque!", | |
"date": 1511315635, | |
"text": "We received reports of a roadrunner in your immediate area! Head to your dashboard to view more information!" | |
}, | |
"per_user_data": [ | |
{ | |
"id": "wiley", | |
"data": { |
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
#standardSQL | |
WITH | |
pages AS ( | |
SELECT | |
anonymous_id, | |
SAFE_CAST(sent_at AS timestamp) AS sent_at, | |
context_page_path, | |
ROW_NUMBER() OVER (PARTITION BY anonymous_id ORDER BY sent_at ASC) AS row_num | |
FROM | |
`table-name-redacted` |