Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Employees Missing Building Number

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

Your question is Employees Missing Building Number. Start with the requirements and the two 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

Find the employees who were in the company but did not have a building number. (Use JOIN).

Asked in the Virtual Onsite stage. SQL question requiring JOIN operations.

Requirements

  1. Return each employee who exists in the company roster but has no building number recorded.
  2. Use a JOIN-based solution, not a subquery.
  3. Output the employee identifier and name.

Output

Schema

employees
ColumnTypeDescription
employee_idPKINTPrimary key for each employee
employee_nameVARCHAR(100)Employee full name
statusVARCHAR(20)Employment status
employee_buildings
ColumnTypeDescription
employee_idINTReferences employees.employee_id
building_numberVARCHAR(10)Assigned building number, may be missing
Tablesemployeesemployee_buildings
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results