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
Rank Branch Placements by Month
00:00
5 left

Rank Branch Placements by Month

MediumSQL · PostgreSQL

Problem

A recruitment company wants to compare branch performance for September 2026. Write a SQL query to calculate each branch's total candidates placed and placement transactions during that month, include only branches that placed more than 100 candidates, and assign their placement rank.

Output

  1. One row per qualifying branch, with columns branch_name, candidates_placed, total_placements, and placement_rank.
  2. Include only branches with more than 100 candidates placed during September 2026. NULL candidate values are ignored by the candidate total.
  3. Rank branches from highest to lowest total placements. Branches tied on total placements share a rank.
  4. Order by total placements descending, then branch name ascending.

Schema

branches
ColumnTypeDescription
branch_idPKINTUnique branch identifier
branch_nameVARCHAR(100)Name of the recruitment branch
cityVARCHAR(100)City where the branch operates
placements
ColumnTypeDescription
placement_idPKINTUnique placement batch identifier
branch_idINTBranch responsible for the placements
placement_dateDATEDate on which the placement batch was recorded
candidates_placedINTNumber of candidates placed in the batch
placement_countINTNumber of placement transactions in the batch
Tablesbranchesplacements
Interviewer

Your question is Rank Branch Placements by Month. Start with the requirements and the two 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.