<p>I am looking for a way in LINQ to match the follow SQL Query.</p>

<pre><code>Select max(uid) as uid, Serial_Number from Table Group BY Serial_Number
</code></pre>

<p>Really looking for some help on this one.  The above query gets the max uid of each Serial Number because of the <code>Group By</code> Syntax.</p>

```
```
using (DataContext dc = new DataContext())
        {
            var q = from t in dc.TableTests
                    group t by t.SerialNumber
                        into g
                        select new
                        {
                            SerialNumber = g.Key,
                            uid = (from t2 in g select t2.uid).Max()
                        };
        }
```
```