Helix Systems' HR team is preparing an onboarding package for a new department manager who needs to review their inherited team.
Write a query to return every employee's ID, name, job title, and hire date.
Assumptions:
- The
employeestable contains every active and former employee at Helix Systems. - Each employee record has an
id, aname, atitle, and ahire_date.
Output:
- One row per employee, with columns
id,name,title, andhire_date.
Schema · hr 4 tables
Run previews · Check grades
Write a query, then run it to see results here.
Worked solution Try it yourself first
SELECT
id,
name,
title,
hire_date
FROM
employees The shape
FROM employees pulls the workforce roster, and the four columns in the SELECT list shape every row into the onboarding-package format: who the person is, what they do, and how long they've been there.
Clause by clause
SELECT id, name, title, hire_datereturns four columns per row, in the order written. That order matches the way a new manager would read the roster: identifier first for cross-referencing, then the name they'll greet, then the title that tells them what the person actually does, then the hire date that tells them how senior the person is on the team.FROM employeesreads every row in theemployeestable. The prompt is explicit that the table contains both active and former employees, and there's noWHEREclause here to narrow it down — so the result includes everyone the table holds. For an onboarding handoff, that's worth noticing: the new manager will see former employees in the list alongside current ones unless the query learns to filter them out.- The column names land in the result exactly as they appear on the table:
id,name,title,hire_date. NoASaliases, because the table's existing names already read clearly enough for an onboarding document. Aliases earn their keep when the underlying name is cryptic or when a computed column needs a label; for straightforward reads from a well-named table, the defaults are fine.
Why this and not SELECT *
The employees table likely carries more columns than these four — department references, salary fields, contact information. The new manager needs the basics to start, not the full HR file. Listing the four columns explicitly gives them a clean roster they can scan in one sitting, instead of a wide sheet that scrolls sideways.
You practiced reading several columns at once without aliasing — the column names in the result match the names on the table. Default column names are the cheapest reasonable choice when the table's column names already read clearly.