SQL query is considering AS-MA14-21 as the last entry for the MA14 series. For the next entry i.e. AS-MA16-100, it is considering only the hundred place digit i.e AS-MA16-1 and hence it appears to be first entry in the MA16 series.