I have two tables User and UserFiles as shown below
User Files table Below
RecordId(primary) | UserID(Foreign) | FileName | PublihsedBy | Date |
1 | 1 | First.DOc | A | 1/1/2001 |
2 | 1 | second.doc | B | 1/1/2012 |
3 | 1 | Third.Doc | B | 1/1/2016 |
4 | 2 | G.PDF | B | 1/1/2014 |
as you can see against one user id we have multiple files like for userid=1 we have three files I want to get the record with latest file inserted in our case i want to get the
Third.Doc how to achieve that