Update of getPreferredSGP to fix YEAR_WITHIN