I am looking to perform a query on an example list of objects
Date Username 01/01/2011 james 01/01/2011 jamie 01/01/2011 alex 01/01/2011 james 02/01/201
Another way to solve this is to group twice, check the sample
var dist = listLogins.GroupBy(d => d.date + d.Username) .Select(x => x.First()) .GroupBy(d => d.date).Select(y => new { date = y.Key, count = y.Count() }).ToList();