Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

SQL and Data Manipulation Assessment

MediumSQL · PostgreSQL00:00
Practice interviewer
In session
5 left
00:00

Your question is SQL and Data Manipulation Assessment. Start with the requirements and the three tables on the right.

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.

Problem

Describe how you would handle a multi-part assessment that includes data manipulation and an ML component, and walk through your approach to the SQL and data preparation steps.

For the SQL portion, prepare one modeling row per candidate using the latest completed assessment attempt and its answer records. Exclude candidates without a completed attempt.

Output

  1. Return candidate_id, region, assessment_date, assessment_score, sql_accuracy, data_cleaning, missing_answer_count, and outcome_label.
  2. Use the completed attempt date and aggregate answer values by question code; preserve candidates with no answers.
  3. Order by candidate_id ascending.

Schema

candidate_profiles
ColumnTypeDescription
candidate_idPKINTCandidate identifier
full_nameVARCHAR(100)Candidate name
regionVARCHAR(50)Candidate region
assessment_attempts
ColumnTypeDescription
attempt_idPKINTAssessment attempt identifier
candidate_idINTCandidate associated with the attempt
completed_atTIMESTAMPAttempt completion timestamp
statusVARCHAR(20)Assessment status
assessment_scoreDECIMAL(5,2)Overall assessment score
outcome_labelINTSupervised learning outcome label
assessment_answers
ColumnTypeDescription
answer_idPKINTAnswer record identifier
attempt_idINTAssessment attempt identifier
question_codeVARCHAR(40)Feature question category
numeric_valueDECIMAL(5,2)Normalized numeric answer value
Tablescandidate_profilesassessment_attemptsassessment_answers
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results