本文介绍了我想将此SQL查询转换为Linq的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将此sql查询转换为Linq C#...请帮助我...并且谢谢

  SELECT  p.CodGestion 
FROM tabla p
GROUP BY p.CodGestion
HAVING COUNT(*)=
SELECT MAX(contador)max_contador
FROM SELECT pro .CodGestion,COUNT(*)contador
FROM tabla pro GROUP BY pro.CodGestion
)T);
解决方案

I want to convert this sql query to Linq C#...Please Help me.. and thanks

SELECT p.CodGestion
FROM tabla p
GROUP BY p.CodGestion
HAVING COUNT(*) =
        ( SELECT MAX(contador) max_contador
                FROM ( SELECT pro.CodGestion, COUNT(*) contador
                            FROM tabla pro GROUP BY pro.CodGestion
) T);
解决方案


这篇关于我想将此SQL查询转换为Linq的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-01 14:33