Linq to Sql Having Count(*)如何写?

原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

0

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)

你可能感兴趣的:(having)