Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
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 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
Build my plan
Regression Testing and Reports
00:00
5 left

Regression Testing and Reports

MediumSQL · PostgreSQL

Problem

Tell me about your experience with regression testing and reporting.

For this SQL exercise, write a query that compares the two most recent completed regression runs. Identify tests that changed from passing in the previous run to failing in the latest run, while also reporting all tests executed in the latest run.

Output

  1. One row per test executed in the latest run.
  2. Columns: test_case_id, test_name, current_status, previous_status, and regression_detected.
  3. Sort by test_case_id ascending.

Schema

regression_runs
ColumnTypeDescription
run_idPKINTUnique regression run identifier
executed_atTIMESTAMPTime when the run was executed
completed_atTIMESTAMPTime when the run completed
environmentVARCHAR(30)Execution environment
regression_results
ColumnTypeDescription
result_idPKINTUnique test result identifier
run_idINTRegression run that produced the result
test_case_idINTTest case being reported
statusVARCHAR(20)Test outcome such as PASS, FAIL, or SKIPPED
test_cases
ColumnTypeDescription
test_case_idPKINTUnique test case identifier
test_nameVARCHAR(100)Descriptive test name
Tablesregression_runsregression_resultstest_cases
Interviewer

Your question is Regression Testing and Reports. 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.