.net 流氓
天下无难事,有志者成之;天下无易事,有恒者得之。

原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)

posted on 2012-03-09 16:55  .net 流氓  阅读(920)  评论(0编辑  收藏  举报