Recent Hires By Department

Return one row per department that hired at least one person in the first half of 2024 — hired_on on or after 2024-01-01 and before 2024-07-01 — with:

  • department — the department name
  • hires — how many people it hired in that range
  • latest_hire — the most recent hired_on among them

Order by hires descending, then by department ascending.

Expected output


department  | hires | latest_hire
------------+-------+------------
Engineering | 3     | 2024-06-30
Sales       | 2     | 2024-05-20
Support     | 1     | 2024-04-04
PostgreSQL

Press Run to start the SQL engine.

SensAI
Beta
Tap the mic to stop voice mode