原SQL:
select avg(degree) from score where cno like '3%' group by Cno having count(*)>=5
Linq:
( from s in Scores where s.CNO.StartsWith("3") group s by s.CNO into cc orderby cc.Count() >= 5 ....
如何写?linq to sql
from s in Scores where s.CNO.StartsWith("3") group s by s.CNO into cc where cc.Count() >= 5 select cc.Average( c => c.DEGREE)