Skip to content

Instantly share code, notes, and snippets.

View tallesborges's full-sized avatar

Talles tallesborges

View GitHub Profile
@tallesborges
tallesborges / retention.sql
Created November 18, 2021 02:14 — forked from sbrissenden/retention.sql
[BigQuery + Google Analytics for Firebase] Daily N-Day User Retention of September 1 Cohort
#standardSQL
####################################################################
# PART 1: Cohort of New Users starting on SEPT 1
####################################################################
WITH
new_user_cohort AS (
SELECT DISTINCT user_pseudo_id as new_user_id
FROM
`projectId.analytics_YOUR_TABLE.events_*`
WHERE