SQL group by a range?

Original text of this message