写多条SQL语句,用union连接实现。
select sum(销量) from 表名 where x<=30
union
select sum(销量) from 表名 where x>30 and x<=60
....