Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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,

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote