Telemetry
Product analytics SQL recipe

Find Features Used Before Upgrade

Join feature events to upgrade events and rank behaviors that occur before paid conversion.

Advancedproduct_eventsReviewed 2026-07-27

Question answered

Which features are most commonly adopted before an account upgrades?

Correlation is not causation, but pre-upgrade behavior helps product teams find features worth testing in onboarding, lifecycle messaging, and plan packaging.

Event contract

Fields the query expects

FieldTypeWhy it exists
timestamp_utcTimestampWhen the event occurred.
team_idUtf8Stable account or workspace identifier.
event_nameUtf8Product event name.
feature_nameUtf8Stable feature identifier for feature_used events.
DataFusion SQL

Copy the query

sql
WITH upgrades AS (
  SELECT
    team_id,
    MIN(timestamp_utc) AS upgraded_at
  FROM product_events
  WHERE event_name = 'plan_upgraded'
  GROUP BY team_id
),
pre_upgrade_features AS (
  SELECT DISTINCT
    e.team_id,
    e.feature_name
  FROM product_events e
  JOIN upgrades u ON e.team_id = u.team_id
  WHERE e.event_name = 'feature_used'
    AND e.timestamp_utc < u.upgraded_at
    AND e.timestamp_utc >= u.upgraded_at - INTERVAL '30 days'
)
SELECT
  feature_name,
  COUNT(DISTINCT team_id) AS upgraded_teams_using_feature
FROM pre_upgrade_features
GROUP BY feature_name
ORDER BY upgraded_teams_using_feature DESC;

This recipe is read-only and reviewed against Telemetry's DataFusion query patterns. Sample output is deterministic and synthetic; validate field types, thresholds, and business definitions against your own data.

Query result

Feature adoption among upgraded teams

Shared dashboards are the most common pre-upgrade behavior in this synthetic example.

feature_nameupgraded_teams_using_feature
shared_dashboard184
alert_created151
scheduled_export112
ai_query97

Synthetic example output. Run the query against your own event schema and thresholds before using it for operational decisions.

How the SQL works

  1. 1The upgrades CTE finds the first upgrade time per team.
  2. 2The join limits feature activity to the thirty days before that upgrade, preventing post-upgrade adoption from contaminating the result.
  3. 3DISTINCT team and feature pairs ensure heavy users do not dominate the ranking.

Edge cases to decide

  • Compare against non-upgraded teams before treating a common feature as predictive.
  • Control for account size, plan eligibility, and tenure where those variables influence both adoption and upgrade.
  • Use exposure events when a feature is not available to every account.

Recommended dashboard

  • Bar chart: upgraded_teams_using_feature
  • Comparison table: adoption among upgraded vs eligible non-upgraded teams
  • Line chart: time from first feature use to upgrade

Alert guidance

This is a product-learning query, not an operational alert. Schedule it as a weekly dashboard review.

Read alert setup

Put the recipe to work

Related instrumentation and guides

Continue the analysis

Run it on real events

Create a table, adapt the fields, and save the result

Start free, send structured events, and use the query result as a chart, shared dashboard widget, or alert input.

Get an API key