Analyze Experiment Results in SQL (2026)
By William Zhu & the InfiniSynapse Data Team · Published: 2026-08-22 · Last updated: 2026-08-24 · Last verified: 2026-08-24 · Next review: 2026-11-24 · Editorial standards · Corrections
Table of Contents
- TL;DR
- What It Means to Analyze Experiment Results in SQL
- A Join-Contract Framework
- How Teams Compare Joins and Exports
- Tool Landscape for Inspectable Queries
- Implementation Steps for a Clean Join
- Desk Sample: Illustrative Join Pack
- Selection Scorecard for Experiment SQL
- Failure Modes That Break the Join
- Frequently Asked Questions
- Conclusion
TL;DR
We evaluate these patterns at the InfiniSynapse desk on sanitized composites; sample figures on this page are illustrative, not customer uplifts.
Direct answer: Analyze experiment results in SQL by joining the assignment log to outcomes on the same unit, with outcomes after
assigned_at, then attach that query to a memo a human signs. A badge without the join is a slide.
What you'll learn: why you analyze experiment results in SQL only after the grain is locked; a six-row join table; ITT versus exposed joins; how to bind metric notes; an illustrative checkout pack; and the breaks that manufacture lift.
To analyze experiment results in SQL is not to generate a random SELECT. It is to replay a contract: unit, time, eligibility, primary, kills. If those keys do not match, stop.
What It Means to Analyze Experiment Results in SQL
Key Definition: Analyze experiment results in SQL means joining a frozen assignment table to named outcome events on one unit identifier, restricting the window to post-assignment time, and producing inspectable queries a reviewer can open beside the signed decision memo.
Payment-message integrity at the Bank for International Settlements is a useful analogy: identifiers must match or the message is not settled. When you analyze experiment results in SQL, a fuzzy name join is the same class of failure.
This join method sits under the parent method in A/B test analysis. This page is narrower: the join, not the full memo shape. For assignment-first order, use experiment analysis. For the optional cut, use CUPED explained.
Same unit, or do not join
You analyze experiment results in SQL on the unit you randomized. If assignment is user and outcomes are session, you will double-count. If cookies split one person, you will leak variants. Exploratory data analysis on key uniqueness belongs before any GROUP BY lift.
Cloud-control language in ISO/IEC 27017 is a reminder that the query you run is an access event. Run the join only on sources you authorize. Do not paste secrets into a prompt.
Time is a join key
Outcomes before assigned_at are not lift. Teams that analyze experiment results in SQL with a first-event clock will manufacture conversion. Use assignment time. If clocks disagree across systems, write the skew in the memo.
A Join-Contract Framework
Every time you analyze experiment results in SQL, fill this table before anyone debates lift.
| Contract row | What you lock | Typical source | Failure if skipped |
|---|---|---|---|
| Unit key | Same id both sides | Assignment + outcomes | Orphan events |
| Variant | One row per unit | Assignment log | Dual-exposed users |
| Time | Outcome ≥ assigned_at | Same clocks | Pre-period as lift |
| Eligibility | Who was allowed in | Flag or join | Ineligible wins |
| Metrics | Primary + kills | Bound note | Column shopping |
| Attach | Query in the memo | Task trail | Slide-only |
Analyze experiment results in SQL only when the contract is filled. Computing-practice expectations at the ACM still prefer a method you can replay. A GUI click is not that method unless it emits the SQL.
Research-program packets at the NSF keep the data step with the claim. When you run that join, the query is that data step.
How Teams Compare Joins and Exports
Teams argue warehouses. They should argue keys. You can analyze experiment results in SQL on a dated CSV if the keys exist.
| Join family | Works when | Breaks when |
|---|---|---|
| ITT on assignment | Policy is the randomize | Exposure sold as ITT |
| Exposed-only | Exposure logged cleanly | Exposure inferred from clicks |
| File-then-SQL | Vintage stamped | Later appends silent |
| Warehouse-native | Same keys, read-only | Write-back imagined |
Catalog practice at the Library of Congress is a reminder that identifiers are the object. Join on stable ids, not display names.
Intent-to-treat joins
Classic form: analyze experiment results in SQL from the assignment list left-joined to outcomes. Units without an event are still in the denominator. That is ITT. Dropping them quietly is not.
Exposed-only joins
You may analyze experiment results in SQL on exposed rows if exposure is logged and labeled secondary. Do not promote that join after a disappointing ITT. Keep both queries in the memo if you run both.
Tool Landscape for Inspectable Queries
You do not need a new warehouse to analyze experiment results in SQL. You need assignment, outcomes, and a bound metric note. Zero-config connection to an existing database is enough. A file upload is enough if the columns are present.
A data agent can draft the join. That is closer to natural language to SQL as an execution path than as a replacement for the design note. Analyze experiment results in SQL still requires a human to name the primary and sign the memo.
Columns that make the join real
Minimum columns for the join: unit_id, variant, assigned_at on the left; same unit_id and an event time on the right. Add eligibility and kill events when you have them. Data governance here is key ownership, not a catalog program.
Knowledge-base sentences in the SELECT
“Conversion” is a CASE, not a vibe. Bind the sentence. Teams that analyze experiment results in SQL with a teammate-specific CASE will fork memos. InfiniSynapse binds a knowledge base to the data source you authorize; it does not ship a prebuilt metric warehouse, and it does not write the query back into production.
If you need the artifact around the query, continue in experiment decision memo. If you need kill lines, use guardrail metrics.
Implementation Steps for a Clean Join
Start with keys, not with AVG. Analyze experiment results in SQL that starts at the badge will hide a bad join.
Prove uniqueness, then join time
Confirm one variant per unit. Analyze experiment results in SQL after a uniqueness check, not before. Restrict outcomes to post-assignment. Record SRM. A 48/52 split on a 50/50 design is a diagnosis, not a footnote.
Explainable AI data analysis is the habit for opening the plan. For horizon math on the same join, see A/B test sample size.
Attach the query to the memo
Ask for a decision memo that includes the SQL. Analyze experiment results in SQL without an attached query is a slide. The agent writes the memo. A human decides ship, hold, or iterate. Read the joins. If first-event time replaced assigned_at, reject the file.
Desk Sample: Illustrative Join Pack
The following numbers are an illustrative desk composite, not a customer result and not an uplift claim.
| Item | Desk composite (illustrative) |
|---|---|
| Left table | Assignment, 64,200 users |
| Right table | Checkout + refund events |
| Broken join | First-event clock; +2.9 pp (illustrative) |
| Correct join | assigned_at clock; +1.1 pp (illustrative) |
| Guardrail | Refund +0.3 pp on correct join (illustrative) |
| Decision | Hold; reject the first-event query |
When you analyze experiment results in SQL on this pack, the clock is the finding. A memo that kept the broken join would have shipped a fiction.

Figure. Desk composite from this page: 64,200 assigned users; broken first-event +2.9 pp vs assigned_at +1.1 pp. Published context: bis.org; iso.org; acm.org. Not a customer experiment, SLA, or official benchmark.
| Evidence class | What you can cite | What you cannot claim |
|---|---|---|
| Desk composite on this page | Keys, clocks, inspectable SQL | Customer uplift or vendor bake-off |
| Published public sources above | Identifiers, access, replay, catalogs | That those bodies ran this desk pack |
Desk composite: first-event +2.9 pp vs assignment-clock +1.1 pp → hold. Context: BIS identifiers, ISO 27017 access, ACM replay, NSF packets, Library of Congress ids.
The pack here is useful because both queries are visible. Keep both in the file if you ran both.
We ran this check on a sanitized composite at the InfiniSynapse desk on 2026-08-23. We asked analyze experiment results in sql on the authorized composite and reopened SQL before anyone briefed. The reject was first-event time as assignment. The assignment table, the written primary, and both intervals had to be present or the pack was held. Figures stay illustrative. What you can copy is the assignment join and the on/off rule, not a lift.
Selection Scorecard for Experiment SQL
Score from 1 to 5. Stacks that cannot emit a join you can open should not win on a prettier badge.
| Criterion | What “5” looks like | Disqualifier |
|---|---|---|
| Key match | Same unit both sides | Name or email fuzzy join |
| Time | Outcome ≥ assignment | First-event clock |
| Inclusion | ITT or exposed, written | Silent drops |
| Attach | Query in the memo | Chat-only winner text |
| Kills | Joined or not measured | Missing = zero |
| Decision rights | Named human owner | Model “recommends ship” |
The join scores well when a skeptic can rerun the file. You score poorly when the stack implies a prebuilt experiment warehouse you do not operate.
Failure Modes That Break the Join
Write the break in the memo if it happened. Reviews go faster when bad keys are explicit.
First-event time as assignment
Teams that analyze experiment results in SQL with the first checkout timestamp as the start will count pre-period intent as lift. Use assigned_at. Write clock skew if it exists.
Dual-exposed units ignored
A user in both arms is a stop. Analyze experiment results in SQL that averages them into the larger arm will hide the leak. Diagnose assignment before GROUP BY.
Metric CASE drift
Two teammates, two CASE expressions. Analyze experiment results in SQL with a bound note, or you will ship two primaries. Bind conversion and refunds before the SELECT.
A fourth pattern is inner-joining outcomes and calling it ITT. Left-join from assignment. Keep zeros in the denominator.
Before you open a workspace, check four things: unit key, assignment timestamps, a written primary CASE, and at least one kill join or an explicit gap. If those four are missing, a tool will still produce a confident interval.
A reviewer who cannot name the unit, the assignment timestamp, and the primary CASE should not sign the memo. The agent can draft the join and the paragraph. The human still owns ship, hold, or iterate. That split is the product of the page: inspectable SQL, not a badge that implies the model decided.
Route the same diagnosis to the live guide that owns the next object. Each row is a single hop.
| Live guide | Open it when |
|---|---|
| analyze database without ETL | the tables already live in a remote database |
| parquet data analysis | the extract is a file lake dump |
| mcp for data analysis | a coding agent will call the same task |
Open the SQL that joins assignment and outcomes
Upload a sanitized assignment-and-outcome extract, bind the metric note, and ask to open the SQL that joins assignment and outcomes. This check uses only sources you authorize.
Commercial association: You do not need the workspace to complete the educational diagnosis on this page.
Open InfiniSynapseHow this page is sourced. William Zhu is cofounder of InfiniSynapse (GitHub @allwefantasy); no personal LinkedIn is published. Desk experience: designing and reviewing production analysis packs—definition locks, read-only source binds, and downloadable
/tasksartifacts. Reviewed by analytics engineering · data platform · LLM security · editor. Editorial standards · corrections · publishing principles · Contact zhuhl@infinisynapse.com. Company Vision. COI: InfiniSynapse sells an AI-native Data Agent; the in-article banner is a commercial association. Fact-check: bis.org · ISO · acm.org · nsf.gov · loc.gov.
Frequently Asked Questions
Can I analyze a CSV instead of a warehouse?
Bottom line: Yes. Analyze experiment results in SQL on a file if it has unit, variant, assignment time, and outcomes. Freeze the file date. Bind metric definitions. Do not treat a missing refund column as a zero refund rate.
Is an inner join on outcomes the same as ITT?
Bottom line: No. Analyze experiment results in SQL for ITT from the assignment list, left-joined. Inner-join drops units with no event and changes the estimand. If you want exposed-only, say so and keep the ITT query.
Who checks the SQL if an agent wrote it?
Bottom line: A human reviewer. A join that you cannot open is not analysis. Read the keys and the time predicate. The agent drafts. The owner still signs ship, hold, or iterate.
Do I need CUPED in the first query?
Bottom line: No. Analyze experiment results in SQL unadjusted first. Add CUPED only with a named pre-period covariate. If the covariate is missing or leaking, leave it off. See the CUPED page for eligibility, not as a rescue.
Conclusion
Analyze experiment results in SQL on one unit, with outcomes after assignment, and attach the query to the memo. Do not use first-event time. Do not drop ITT rows quietly. Bind the CASE. Name the human who ships.
When the tables and the metric note are ready, analyze experiment results in SQL on an authorized extract at https://app.infinisynapse.com/. Open the join, keep the file, and reuse the same keys on the next test.