Select Employees Joined This Current Year

Find employees who joined this year.

sql

SELECT id, name, created_at FROM employees WHERE YEAR(created_at) = YEAR(CURDATE());

This query selects the "id", "name", and "created_at" columns from the "employees" table for records where the year of the "created_at" date matches the current year.

PromptDB can make mistakes. Please double-check responses.