Sql Server- Create a query that will show those employees that left Auntie B\'s
ID: 3730362 • Letter: S
Question
Sql Server-
Create a query that will show those employees that left Auntie B's in 2014. In your output show the people id, hire date, term date and years employeed. In your output include people id and the number of years employed. Title this last column "Years Employed".
PeopleID HireDate TermDate Years Employed
----------- ---------- ---------- ---------------
1016 2010-06-22 2014-01-15 4
1029 2010-02-10 2014-02-05 4
How do I turn two dates into amount of years?
Explanation / Answer
In sql there is a function datediff to find the difference between 2 dates:
Here this function is returns the two dates into amount of years,
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.