select floor(regno/100) "groupby", min(regno),max(regno),min(name),max(name) from registrations group by `groupby`;