Ver originalSELECT CASE ROW_NUMBER() OVER(Partition BY Campo2 ORDER BY CampoN) WHEN 1 THEN 1 ELSE 0 END Conteo, *FROM MiTabla;