select a.*
from tab a join(
    select [year],[month]=max([month]) from tab group by [year]
)b on a.[year]=b.[year] and a.[month]=b.[month]