Si tienes SQL 2005, prueba esto:
Código SQL:
Ver originalSELECT T1.*
FROM (
SELECT *, ROW_NUMBER() OVER (partition BY ano,meta,mes ORDER BY ano,meta,mes) x
FROM resumen_metas
) T1
INNER JOIN (
SELECT ano,meta,mes,MAX(x) x
FROM (
SELECT *, ROW_NUMBER() OVER (partition BY ano,meta,mes ORDER BY ano,meta,mes) x
FROM resumen_metas
) T
GROUP BY ano,meta,mes
) T2 ON T1.ano = T2.ano AND T1.meta = T2.meta AND T1.mes = T2.mes AND T1.x = T2.x