把下列SQL转换成Lamda表达式
SQL code
SELECT Level, COUNT(Level), COUNT(Level) / (SELECT COUNT(*) FROM Player) FROM Player Group By Level
这句SQL如何转化,简化些也可以的
------解决方案--------------------
from p in CTX.Player
group p by p.Level
into g
select new{
Level=g.Key,
Count=g.Count(),
ACount=g.Count()/CTX.Player.Count()
}