I need to select employees whose work experience is currently more or equal to 15 years. Also I have to display their work experience in years in a separate column.
I have tried this
SELECT CONCAT(CONCAT(FIRST_NAME, ' '), LAST_NAME) AS "Fn and Ln"
FROM HR.EMPLOYEES WHERE DATE_FORMAT(FROM_DAYS(DATEDIFF(NOW(), HIRE_DATE)), '%Y')
+ 0 >= 15;
I'm stuck on "ORA-00904: "DATE_FORMAT": invalid identifier" and also I don't know how to create a separate column with their work experience (in years).
Database: