0

This is the table I want to display information of employees who have more than 20 years of experience.

i need query for this

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
  • This is a basic `WHERE` condition. What have you tried? – Gordon Linoff Dec 17 '20 at 11:25
  • Does this answer your question? [How to get the difference in years from two different dates?](https://stackoverflow.com/questions/7749639/how-to-get-the-difference-in-years-from-two-different-dates) – Popeye Dec 17 '20 at 11:28
  • We don't know what information you have . and do you mean in current role or from when onboarded or in a specific skill , Question needs clarity. – P.Salmon Dec 17 '20 at 11:57
  • Which dbms are you using? When it comes to date/time, many products are far from ANSI SQL compliant. – jarlh Dec 17 '20 at 12:29

1 Answers1

0

I don't know which database you are using, but in oracle database, this will work fine.

select *
from Your_Table
where months_between (sysdate, Your_Employee_Hire_Date_Column) > 12 * 20
;
Mahamoutou
  • 1,555
  • 1
  • 5
  • 11