Company: Apple | Difficulty: easy
Find all employees who were hired after 2022-01-01.
employees
2022-01-01
Return the columns in this exact order: name, department, and hire_date. Sort the results by hire_date in descending order.
name
department
hire_date
Employees hired exactly on 2022-01-01 should not be included. Employees with a NULL hire_date should also be excluded.
employee_id
Tim Cook and Craig Federighi were hired after 2022-01-01, so they are returned. Eddy Cue was hired exactly on 2022-01-01, so he is excluded. The output is sorted by hire_date in descending order.
Tim Cook
Craig Federighi
Eddy Cue
DROP TABLE IF EXISTS employees; CREATE TABLE employees ( employee_id INT, name VARCHAR(100), department VARCHAR(80), hire_date DATE ); INSERT INTO employees VALUES (1, 'Tim Cook', 'Leadership', '2022-02-10'), (2, 'Craig Federighi', 'Software Engineering', '2023-01-15'), (3, 'Eddy Cue', 'Services', '2022-01-01');
← All SQL Challenges · Apple Questions · Learn SQL Free