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
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
Get started
MongoDB Fit and Motivation
00:00
5 left

MongoDB Fit and Motivation

MediumSQL · PostgreSQL

Problem

Why do you want to join MongoDB?

Answer this as a SQL interview exercise by producing the requested result set from the tables below. Keep the output focused and deterministic.

Output

  1. One row per candidate, with the columns candidate_name, motivation_score, and primary_reason
  2. Include only candidates with at least one completed interview stage
  3. Sort by motivation_score descending, then candidate_name ascending

Schema

candidates
ColumnTypeDescription
candidate_idPKINTUnique candidate identifier
candidate_nameVARCHAR(100)Candidate full name
role_applied_forVARCHAR(100)Role the candidate applied for
sourceVARCHAR(50)Recruiting source
interview_stages
ColumnTypeDescription
stage_idPKINTUnique stage identifier
candidate_idINTReferences candidates.candidate_id
stage_nameVARCHAR(50)Interview stage name
completed_atDATEDate the stage was completed
interview_responses
ColumnTypeDescription
response_idPKINTUnique response identifier
candidate_idINTReferences candidates.candidate_id
response_typeVARCHAR(20)Response sentiment type
response_textTEXTFree-text response
Tablescandidatesinterview_stagesinterview_responses
Interviewer

Your question is MongoDB Fit and Motivation. 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.