Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save madilk/7eabfc1f6b0559d76dd72b03b8be6f2b to your computer and use it in GitHub Desktop.
Save madilk/7eabfc1f6b0559d76dd72b03b8be6f2b to your computer and use it in GitHub Desktop.
Big Query for Google Analytics 4 - Get user counts between two fixed dates

#Standard SQL
SELECT
event_date,
COUNT (DISTINCT(user_pseudo_id)) AS user_counts FROM
analyticslog-app-plus-web.analytics_240627631.*
WHERE
event_date BETWEEN '20200801' AND '20200831'
GROUP BY event_date
ORDER BY event_date ASC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment