Common event contract
Fields that keep these queries reusable
- timestamp_utc, event_name, user_id, team_id, and session_id
- feature, source, plan, experiment_variant, and status
- stable activation, retention, upgrade, and churn milestones
Definitions before SQL
Decisions the query cannot make for you
- 1Write one durable definition for activation and reuse it everywhere.
- 2Choose whether funnels count users, teams, sessions, or attempts.
- 3Keep anonymous and authenticated identity rules explicit.
Recommended sequence
Build detection first, then diagnosis
Analysis patterns
Make the result explain a decision
Define milestones first
Write durable definitions for signup, activation, adoption, retention, upgrade, and churn before calculating a funnel or cohort.
Choose the counting unit
Decide whether the analysis follows users, teams, sessions, accounts, or attempts and keep that unit consistent.
Compare like-for-like cohorts
Use complete observation windows and stable acquisition or experiment dimensions before interpreting a difference.
Complete recipes
Copy the query, then validate the assumptions
Build a Signup-to-Activation Funnel in SQL
Calculate unique-user conversion through signup, onboarding, integration, and first-value milestones.
Where do new users leave before reaching first value?
See SQL and resultCalculate Weekly Cohort Retention
Group users by first activity week and measure the percentage returning in later weeks.
What percentage of each signup cohort returns in weeks one through twelve?
See SQL and resultFind Features Used Before Upgrade
Join feature events to upgrade events and rank behaviors that occur before paid conversion.
Which features are most commonly adopted before an account upgrades?
See SQL and resultCalculate DAU, WAU, and Product Stickiness
Measure daily and weekly active users together and calculate DAU-to-WAU stickiness from a consistent activity definition.
What share of weekly active users returns on an average day?
See SQL and resultCompare Funnel Conversion by Acquisition Source
Measure signup-to-activation conversion by acquisition source while deduplicating repeated milestone events.
Which acquisition sources produce users who activate?
See SQL and resultMeasure Time to Activation
Calculate the distribution of elapsed time between signup and a user’s first meaningful product action.
How long does it take new users to reach the first meaningful action?
See SQL and resultMeasure Churn and Reactivation by Cohort
Classify accounts as retained, churned, or reactivated from recurring meaningful product activity.
How many accounts churned, stayed active, or returned this month?
See SQL and resultCompare Experiment Conversion and Revenue Lift
Measure conversion, revenue per participant, and relative lift by experiment variant without double-counting repeated events.
Did the experiment improve conversion and revenue per assigned participant?
See SQL and resultMeasure Product Journey Drop-Off by Session
Measure how many sessions reach each ordered product milestone and calculate both journey completion and step-to-step conversion.
Where do sessions leave the path from landing page to first query?
See SQL and resultAdapt the event contract before the threshold
Keep the analysis pattern, but validate table names, field types, business definitions, time windows, and minimum-volume rules against your own events. Every published query is also planned and executed against an empty typed table with the pinned engine.