Event schema
Fields the query expects
| Field | Type | Why it exists |
|---|---|---|
| trial_id | Utf8 | Fictional attempt identifier, not a student or person ID. |
| event | Utf8 | One recorded step in the toy practice-question flow. |
Copy the query
SELECT
COUNT(DISTINCT CASE WHEN event = 'flow_started' THEN trial_id END) AS started,
COUNT(DISTINCT CASE WHEN event = 'question_opened' THEN trial_id END) AS opened,
COUNT(DISTINCT CASE WHEN event = 'answer_submitted' THEN trial_id END) AS submitted
FROM prototype_events;This read-only query is planned and executed against an empty typed table with Apache DataFusion 45.2.0. We review the synthetic sample output separately. Check field types, thresholds, and counting rules against your own data. Read the testing methodology.
Query result
Recorded distinct trials
Eight starts, six question opens, and three submissions were recorded in the fictional fixture.
| started | opened | submitted |
|---|---|---|
| 8 | 6 | 3 |
Synthetic example output. Run the query against your own event schema and thresholds before using it for operational decisions.
Reproduce the example
Download the sample data
The JSON bundle includes the event schema with field types, reproducible input rows, exact SQL, expected output, review notes, and engine version. The CSV contains the displayed result.
How the SQL works
- 1COUNT(DISTINCT trial_id) counts attempts with each event. toy-02 has two question-opening rows, so counting rows would overstate that step by one.
- 2The recorded count falls by two between start and open, then by three between open and submit.
- 3A missing submit event does not prove abandonment. The person may have stopped, the app may have failed, or the logger may have missed the event.
Edge cases to check
- A submitted event without an opened event would break the expected sequence; inspect individual trials before interpreting a real funnel.
- Reused or missing trial IDs can corrupt distinct counts. Define the identifier before collecting real events.
- These fictional rows contain no randomized comparison and cannot measure the impact of a design change.
Recommended dashboard
- Table: distinct trial counts for the three recorded steps
Alert guidance
This fictional teaching fixture is not suitable for a production alert.
Read alert setupSet up the events this query needs
Related instrumentation and guides
Continue the analysis
Build a signup-to-activation funnel in SQL
Calculate unique-user conversion through signup, onboarding, integration, and first-value milestones.
Open recipeCalculate weekly cohort retention
Group users by first activity week and measure the percentage returning in later weeks.
Open recipeFind features used before upgrade
Join feature events to upgrade events and rank behaviors that occur before paid conversion.
Open recipeRun it on your 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.
Telemetry’s current terms require account creators to be over 18. Younger students can use the printable activity without creating an account. Terms of Service