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
SQL Coding Under Pressure
00:00
5 left

SQL Coding Under Pressure

MediumSQL · PostgreSQL

Problem

Tell me about a time you had to write or debug SQL quickly to solve a data problem.

Using the supplied tables, write a query that identifies candidate and job pairs with multiple applications submitted within 30 days of one another. Return only qualifying pairs, including all applications for each pair and the most recently recorded status among those applications.

Output

  1. One row per qualifying candidate and job pair.
  2. Columns: candidate_name, job_title, application_count, first_application_date, last_application_date, and latest_status.
  3. Sort by candidate_name, then job_title ascending.

Schema

candidates
ColumnTypeDescription
candidate_idPKINTUnique candidate identifier
candidate_nameVARCHAR(100)Candidate display name
emailVARCHAR(150)Candidate email address
jobs
ColumnTypeDescription
job_idPKINTUnique job identifier
job_titleVARCHAR(150)Job title
locationVARCHAR(100)Job location
applications
ColumnTypeDescription
application_idPKINTUnique application identifier
candidate_idINTCandidate who submitted the application
job_idINTJob associated with the application
submitted_atDATEDate the application was submitted
application_status_history
ColumnTypeDescription
status_history_idPKINTUnique status-history identifier
application_idINTApplication whose status changed
statusVARCHAR(30)Status recorded for the application
status_updated_atTIMESTAMPTimestamp when the status was recorded
Tablescandidatesjobsapplicationsapplication_status_history
Interviewer

Your question is SQL Coding Under Pressure. Start with the requirements and the four 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.