Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
ExperiencesCoaching
New
Practice
Mock InterviewsTimed interview simulations with feedbackSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Get started

Design Experiment Assignment Schema

MediumSQL & Data Manipulation00:00
Practice interviewer
In session
5 left
00:00

Whenever you're ready, walk me through how you'd approach this.

You need to log in / sign up to chat or submit.

Problem

Context

At Meta, teams running experiments on surfaces like Facebook Feed or Instagram Reels need schemas that support both reliable analysis and efficient SQL querying. A weak design makes it hard to answer basic questions like who was assigned, when they were exposed, and whether they converted.

Core question

Explain how you would design a PostgreSQL schema to track A/B test assignments and outcomes. Your answer should cover:

  1. The core tables and keys needed to represent experiments, variants, assignments, exposures, and outcome events
  2. How to handle assignment grain, late-arriving events, and users with multiple events
  3. How analysts would join the tables to compute experiment metrics such as conversion rate and guardrails
  4. What constraints or modeling choices help prevent common data quality issues

Scope guidance

The interviewer expects a practical schema design discussion grounded in SQL analytics. Focus on table structure, join paths, event timestamps, deduplication strategy, and trade-offs between normalized event tables and pre-aggregated outcome tables.