If tried to simulate your code (and DataTable). The problem I ran into was that id field (I assume that it is the field containing the time) contains a datetime value instead off a int. So to calculate the sum, I changed it into
var qry = from row in dtTbl.AsEnumerable()
group row by row.Field<string>("t_Source") into grp
select new
{
sum = grp.Sum(r=>r.Field<datetime>("id").TimeOfDay.TotalSeconds)
};
Rewriting the code to a solution you could use, could look something like this:
var qry = from row in dtTbl.AsEnumerable()
group row by row.Field<string>("t_Source") into grp
select new
{
source = grp.Key,
avg = new TimeSpan(0, 0, (int)(grp.Average(r => r.Field<datetime>("id").TimeOfDay.TotalSeconds))),
max = new TimeSpan(0, 0, (int)(grp.Max(r => r.Field<datetime>("id").TimeOfDay.TotalSeconds)))
};
foreach (var grp in qry2)
{
Console.WriteLine(String.Format("Source {0}: average = {1}, max = {2}", grp.source, grp.avg, grp.max));
}