DEV Community


LINQ Group By

Joe Enos
Software developer/architect, mostly working with .NET and SQL Server.
・1 min read

GROUP BY in SQL is an easy way to calculate sums, averages, counts, max, or min, of a series of data, with subtotals by a particular group. It's a pretty straightforward syntax in SQL.

With LINQ, it's a little bit different. Here's a video showing how to group using LINQ, whether it's for Entity Framework, LINQ-to-objects, or any other LINQ implementation.

Discussion (0)