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
Start free
Excel and Programming Assessment
00:00
5 left

Excel and Programming Assessment

HardSQL · PostgreSQL

Problem

Describe how you would approach a multi-step Excel and programming assessment to produce an accurate result.

Use the provided assessment tables to produce an auditable SQL result. Treat a submission as accurate only when it is submitted, contains both required steps, has no missing step results, has no failed validation checks, and has steps completed in chronological order.

Output

  1. One row per submission, including draft and submitted submissions.
  2. Return candidate_id, completed_steps, failed_checks, missing_values, out_of_order_steps, accuracy_status, and duration_minutes.
  3. Sort by submission_id ascending.

Output details

  • Count a validation failure only when check_status equals FAILED, and report failed_checks as zero when none exist.
  • Treat a missing step result as result_value being NULL.
  • Count a step as out of order only when its completion timestamp is strictly earlier than the preceding step's timestamp; equal timestamps are in order.
  • Round duration_minutes to two decimal places and report zero as 0.00 when completion timestamps are unavailable.

Schema

assessment_submissions
ColumnTypeDescription
submission_idPKINTUnique assessment submission identifier
candidate_idVARCHAR(30)Candidate identifier
submitted_atTIMESTAMPTime the assessment was submitted
statusVARCHAR(20)Submission state
assessment_steps
ColumnTypeDescription
step_idPKINTUnique step result identifier
submission_idINTRelated assessment submission
step_numberINTSequential step number
step_nameVARCHAR(50)Name of the assessment step
result_valueDECIMAL(10,2)Recorded step result
expected_valueDECIMAL(10,2)Reference result for comparison
completed_atTIMESTAMPTime the step was completed
validation_checks
ColumnTypeDescription
check_idPKINTUnique validation check identifier
submission_idINTRelated assessment submission
step_idINTRelated step, when applicable
check_typeVARCHAR(40)Validation category
check_statusVARCHAR(20)Validation outcome
checked_atTIMESTAMPTime of validation
Tablesassessment_submissionsassessment_stepsvalidation_checks
Interviewer

Whenever you're ready, walk me through your approach or go straight to the code. The requirements and the three tables are in the Question tab.

Sign up free to run or submit. Log in
CodePostgreSQL
Sign up free to run your code. Your draft is saved.Run with a free accountLog inLn 1
Run your query to see results here.