I have to query this table:
symbol time ------ ---------- aaa 2013-04-18 09:10:28.000 bbb 2013-04-18 09:10:27.000 aaa 2013-04
try out this
var q = MyTable.GroupBy(x => x.symbol ) .Select(g => g.OrderByDescending(i => i.time).First());
or use max like this
var data = from r in MyTable group r by r.symbol into g select new { name= g.Key, data= g.Max(a=>a.time) };