I'm still learning LINQ, but it works
var result = from t1 in table1 from t2 in table2 where t1.key == t2.key && DateTime.Parse("2010-02-01") <= t1.trndate && t1.trndate <= DateTime.Parse("2010-02-28") group new {t1,t2} by t1.vat into g select new { vat = g.Key, sum = g.Sum(p => p.t1.QTY*p.t2.FLG01 + p.t1.QTY*p.t2.FLG04)};
I hope this translates LINQ to SQL well, because I only tried it on objects.
source share