this query will give you all the departments, and for each department the sum. There need to be more than (in this example) 1 employee

var departmentquery = from row in dt.AsEnumerable()

group row by row["department"] into grp

where grp.Count() > 1

select new {

deparmtent = grp.Key,

Sum = grp.Sum(r => r.Field<decimal>("score"))

};

```
DataTable dt = new DataTable("department");
dt.Columns.Add(new DataColumn("department"));
dt.Columns.Add(new DataColumn("employeeId"));
dt.Columns.Add(new DataColumn("score",System.Type.GetType("System.Decimal")));
DataRow datarow = dt.NewRow();
datarow[0] = "1";
datarow[1] = "1";
datarow[2] = 10;
dt.Rows.Add(datarow);
datarow = dt.NewRow();
datarow[0] = "1";
datarow[1] = "2";
datarow[2] = 10;
dt.Rows.Add(datarow);
datarow = dt.NewRow();
datarow[0] = "1";
datarow[1] = "3";
datarow[2] = 10;
dt.Rows.Add(datarow);
datarow = dt.NewRow();
datarow[0] = "2";
datarow[1] = "1";
datarow[2] = 10;
dt.Rows.Add(datarow);
datarow = dt.NewRow();
datarow[0] = "2";
datarow[1] = "2";
datarow[2] = 10;
dt.Rows.Add(datarow);
datarow = dt.NewRow();
datarow[0] = "3";
datarow[1] = "1";
datarow[2] = 10;
dt.Rows.Add(datarow);
var departmentquery = from row in dt.AsEnumerable()
group row by row["department"] into grp
where grp.Count() > 1
select new {
deparmtent = grp.Key,
Sum = grp.Sum(r => r.Field<decimal>("score"))
};
```