Below is my Table Structure with data:
ID Date EmpId 67 2015-08-24 10:44:33.087 293 68 2015-08-24 10:41:49.950 293 69 2015-08-24 10:42:49.951 293 70 2015-08-24 10:45:15.157 013 71 2015-08-24 10:46:33.131 013 72 2015-08-24 10:42:33.134 013 73 2015-08-24 10:47:33.136 013 ID Column is a auto generated column. For every employee there are 2 or more than 2 records. In this case. EmpId - 293 has got three records. 013 has got 4 records. I am looking for a query to return record with maximum Date for every employee. In this case the result should be as below:
ID Date EmpId 69 2015-08-24 10:44:33.087 293 73 2015-08-24 10:47:33.136 013 My requirement is to return all 3 columns in the result set.