I have a table, \'lasttraces\', with the following fields.
Id, AccountId, Version, DownloadNo, Date
The data looks like this:
If you want the whole record,here is a lambda way:
var q = _context .lasttraces .GroupBy(s => s.AccountId) .Select(s => s.OrderByDescending(x => x.Date).FirstOrDefault());