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
Top Candidates with Complex Joins
00:00
5 left

Top Candidates with Complex Joins

HardSQL · PostgreSQL

Problem

Phenom's recruiting analytics team wants to identify top-performing candidates across its candidate experience and recruiting workflows. Write a PostgreSQL query that ranks eligible candidates using application outcomes and completed interview scores.

Requirements

  1. Consider applications submitted from January 1, 2025 through June 30, 2025.
  2. Include candidates with at least two completed interviews, an average completed interview score of at least 75, and at least one application with status advanced or hired.
  3. Calculate each candidate's application count, completed interview count, average interview score, and advanced application count.
  4. Rank candidates by average interview score in descending order and return the top three ranks, including ties.

Schema

candidates
ColumnTypeDescription
candidate_idPKINTUnique candidate identifier
full_nameVARCHAR(100)Candidate full name
emailVARCHAR(150)Candidate email address
current_titleVARCHAR(120)Candidate's current job title
applications
ColumnTypeDescription
application_idPKINTUnique application identifier
candidate_idINTReferences candidates.candidate_id
applied_atDATEDate the application was submitted
statusVARCHAR(30)Current application status
sourceVARCHAR(50)Application source
interviews
ColumnTypeDescription
interview_idPKINTUnique interview identifier
application_idINTReferences applications.application_id
interview_statusVARCHAR(30)Interview completion status
scoreINTInterview score from 0 to 100
interviewerVARCHAR(100)Interviewer name
Tablescandidatesapplicationsinterviews
Interviewer

Your question is Top Candidates with Complex Joins. 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.