Link to home
Get AccessLog in
Avatar of Mohammad Alsolaiman
Mohammad AlsolaimanFlag for Saudi Arabia

asked on

SQL get last three course rows for each employee

Hi:
I need to have the latest three course  rows for each employee
tblCourse
          empNo
         courseName
         courseEndDate
please help me do so.
note:
I had try "LIMIT" but I encountered "Incorrect syntax near 'LIMIT'".
So please try any solution other than LIMIT
Avatar of Obadiah Christopher
Obadiah Christopher
Flag of India image

Select top 3 empNo, courseName, courseEndDate from tblCourse order by courseEndDate desc
Avatar of Mohammad Alsolaiman

ASKER

How about the other employees?
I think this will retrive only first three rcirds. While my question is to retrive the last three courses for each employee.
ASKER CERTIFIED SOLUTION
Avatar of PortletPaul
PortletPaul
Flag of Australia image

Link to home
membership
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access
thanks to all for participating answering my question, especially PortletPaul (awesome).