In this list a teacher can have multiple SchoolEndYears. I would like to modify this query so I'm only grabbing the max for each teacher.

* TeacherA - 2012
* TeacherA - 2013
* TeacherA - 2014
* TeacherB - 2013
* TeacherC - 2012

**Code:**

```
var    gridInfo = (from teacher in TeacherAccesses
                   join u in USERS
                   on teacher.ID equals u.ID
                   select new 
                   {
                      Name = u.LastName + ", " + u.FirstName,
                      ID = teacher.ID,
                      Flag = "Existing",
                      SchoolID = teacher.SchoolID,
                      status = teacher.TeacherAttr.IncludeinOfficialResults.Value,
                      SchoolEndYear = teacher.TeacherAttr.SchoolEndYear
                    }).OrderByDescending(x=>x.SchoolEndYear).OrderBy(x=>x.Name);

```

As you can see I tried doing the `.OrderByDescending` but when I tried to do a `.FirstOrDefault` it only brings back the 1st record in the group.

What I'm hoping to bring back is:

* TeacherA - 2014
* TeacherB - 2013
* TeacherC - 2012