Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
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
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess 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
Build my plan
AI/ML Case Study Theory
00:00
5 left

AI/ML Case Study Theory

HardSQL · PostgreSQL

Problem

Explain the theories behind the AI/ML solution you develop in a case study or take-home challenge. For this SQL implementation, produce an evaluation summary from model runs, datasets, and prediction results. Include classification metrics, comparison with the prior run for the same model, and relative performance among runs evaluated on test data.

Output

  1. One row per test-data model run.
  2. Columns: run_id, model_name, dataset_name, evaluated_cases, precision, recall, f1_score, previous_f1_score, f1_change, and performance_rank.
  3. Sort by dataset_name, then run_started_at ascending.

Schema

datasets
ColumnTypeDescription
dataset_idPKINTDataset identifier
dataset_nameVARCHAR(100)Dataset name
splitVARCHAR(20)Dataset split
model_runs
ColumnTypeDescription
run_idPKINTModel run identifier
model_nameVARCHAR(100)Model name
dataset_idINTEvaluated dataset identifier
run_started_atDATEDate the run started
hypothesisVARCHAR(200)Short modeling hypothesis
prediction_results
ColumnTypeDescription
prediction_idPKINTPrediction identifier
run_idINTModel run identifier
entity_idVARCHAR(50)Scored entity identifier
actual_labelBOOLEANObserved binary label
predicted_labelBOOLEANPredicted binary label
confidenceDECIMAL(5,4)Prediction confidence
Tablesdatasetsmodel_runsprediction_results
Interviewer

Your question is AI/ML Case Study Theory. Start with the requirements and the three tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
Sign up free to run your codeLog inLn 1
Run your query to see results here.