Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Employees Joined This Year

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

Your question is Employees Joined This Year. Start with the requirements and the one table 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 how many employees joined this company during this year.

Asked in the Virtual Onsite stage. SQL question asked during interview rounds.

Task

Write a SQL query to count employees whose join_date falls in the current calendar year.

Requirements

  1. Return a single row with the total count.
  2. Use PostgreSQL date logic based on the current year.
  3. Ignore employees with NULL join dates.

Output

Schema

employees
ColumnTypeDescription
employee_idPKINTPrimary key for each employee
employee_nameVARCHAR(255)Employee full name
join_dateDATEDate the employee joined the company
Tablesemployees
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results