8,497
社区成员
发帖
与我相关
我的任务
分享
SELECT distinct top 10
a,
COUNT(a) as cnt
FROM t
where c='xxx'
group by a
order by cnt desc
((from t in db.t
where
t.c == "xxx"
group t by new {
t.a
} into g
orderby
g.Count() descending
select new {
g.Key.a,
cnt = g.Count()
}).Distinct()).Take(10)
var query = from t in db.T
where t.c == "xxx"
group t by t.a into g
order by g.Count() descending
select new {g.Key, cnt=g.Count()};