Query Employees Joined Last Six Months

Find employees who joined in the last 6 months.

sql

SELECT id, name, created_at FROM employees WHERE created_at >= DATE_SUB(NOW(), INTERVAL 6 MONTH);

This query selects the id, name, and created_at columns from the employees table for records where the created_at date is within the last six months relative to the current system time.

PromptDB can make mistakes. Please double-check responses.