Created
June 2, 2022 12:33
-
-
Save scips/0cba22c19ecef8b8a38f4a7737e94e25 to your computer and use it in GitHub Desktop.
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
SELECT event_date, device.web_info.browser, REGEXP_EXTRACT(device.web_info.browser_version, r'^(\d+)') as browser_major_version, COUNT(*) as total | |
FROM `*-analytics-*.analytics_*.events_*` | |
WHERE platform='WEB' AND event_name = 'page_view' AND event_date BETWEEN FORMAT_DATE("%Y%m%d",DATE_ADD(CURRENT_DATE(), INTERVAL -1 WEEK)) AND FORMAT_DATE("%Y%m%d",CURRENT_DATE()) | |
GROUP BY event_date, device.web_info.browser, browser_major_version | |
ORDER BY event_date DESC,total DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment