let\'s say that I have a table called Items (ID int, Done int, Total int)
I can do it by two queries:
int total = m.Items.Sum(p=>p.Total) int done
This will do the trick:
from p in m.Items group p by 1 into g select new { SumTotal = g.Sum(x => x.Total), SumDone = g.Sum(x => x.Done) };