Skip to content

Instantly share code, notes, and snippets.

@ivanpk

ivanpk/distinct.sql Secret

Created Feb 4, 2020
Embed
What would you like to do?
SELECT
DATE(created_at) AS day,
COUNT(DISTINCT user_id) AS distinct_users
FROM
`example-project.ivan.article_example_dataset`
GROUP BY
1
ORDER BY
1 DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment