标签: sql entity-framework linq ef-code-first
我不会为运营商选择前4名(在用户表中有最大数量)
SELECT TOP 4 [Operator], COUNT(Operator) as opCount FROM [Users] Group by Operator order by opCount desc
答案 0 :(得分:0)
请尝试这样的事情。
var result = db.Users.Take(4).GroupBy(y=>y.Operator).ToList();