Work Anniversaries This Month
Medium
Date Arithmetic
Treat the current date as 2026-10-06. Return the name and completed years of service (as of 2026) of employees whose hire anniversary falls in October. Order by name.
Table schema
Employees(id INT PRIMARY KEY, name VARCHAR(50), hire_date DATE)Sample data
id | name | hire_date
1 | Amy | 2020-10-15
2 | Ben | 2019-03-01
3 | Cara | 2022-10-02
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.