select *
, (
select AVG(RatingVal)
from Ratings
where Ratings.AppID = ID
) as average
from Applications
答案 0 :(得分:0)
var result = from r in Ratings
group by r.AppID into rg
from a in applications
where a.ID = rg.Key
select new {Application = a, AvgRating = rg.Avg(r=>r.RatingVal)};
没有测试过,但这应该可行。