SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Employee Tenure in Years and Months

Build mastery in Date Operations with this scenario-based SQL challenge and live execution support.

Problem Statement

As of the fixed reference date 2025-01-01, break each employee's tenure into completed years and remaining months. Return employee_id, first_name, last_name, hire_date, years, months — ordered by years DESC, months DESC, employee_id.

Relevant Tables

employees

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: