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);
var qry = tabla.OrderByDescending(x=>x.Count()).Select(x=>x.CodeGestion);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)