Show Most Recent Hires First
Return first_name, last_name, and hire_date for every employee, ordered from the most recent hire to the oldest.
- Sorting
Exercise brief
Understand the request
People operations coordinator An onboarding review needs the newest hires at the top of the report.
List employees sorted so that the most recently hired appears first. Show first_name, last_name, hire_date.
Return
- Return one row per employee.
- Order dates from newest to oldest.
Constraints
- Sort hire_date descending.
Data you will use
Review the relevant tables before deciding how to join, filter, or aggregate them.
employees
first_nameTEXTlast_nameTEXThire_dateDATE
Hints, when you need them
Open one clue at a time so you still do the reasoning.
Hint 1
Dates sort chronologically — earlier dates are "smaller", later dates are "larger".
Hint 2
Most-recent-first means DESC. Oldest-first is ASC.
Hint 3
ORDER BY hire_date DESC
Verified SQL answer
Attempt the problem first, then compare structure and reasoning—not just syntax.
Reveal solution and explanation
SELECT first_name, last_name, hire_date FROM employees ORDER BY hire_date DESC;Why this works
Date columns stored as DATE/DATETIME sort correctly out of the box. Date STRINGS in `YYYY-MM-DD` format also sort correctly (lexicographic = chronological). Avoid storing dates as `MM/DD/YYYY` strings — they sort wrong.
Success check
The latest hire is first and the earliest hire is last.
Expected result
Use this output to verify values, aliases, ordering, and row count.
| first_name | last_name | hire_date |
|---|---|---|
| Emma | Thomas | 2023-01-10 |
| David | Brown | 2022-02-28 |
| Amy | Taylor | 2021-12-03 |
| Mike | Johnson | 2021-06-10 |
| Rachel | Garcia | 2020-11-30 |
| Lisa | Davis | 2020-09-12 |
| Chris | Anderson | 2020-04-25 |
| John | Doe | 2020-01-15 |
| Alex | Miller | 2019-08-14 |
| Tom | Wilson | 2019-07-18 |
Previewing 10 of 12 expected rows. Run the query in the editor to inspect the full result.
Learn the concepts behind this answer
Strengthen your understanding with these targeted learning topics:
Continue practicing
Build the next SQL skill
LIMIT & OFFSET
Practice deterministic top-N, cutoff ties, offset pagination, composite keyset cursors, and resumable bounded batches.
Ranking & NTH Value
Solve deterministic ranking, top-N, distribution, positional-frame, and rolling-window problems.
SELECT Statements
Select columns, filter rows, remove duplicates, and order query results.
Open the interactive workspace and practice across SQL topics.