There is a quarter function in db2.
You can use any function in group by, in your case you can just divide rating by 10 (integer divided by integer will give an integer number, no need for round)
select rating/10, sum(amount)
from table1
where rating between 1 and 100
group by rating/10
I suggest you read some books on SQL, like DB2 SQL Cookbook
http://ourworld.compuserve.com/homep...l/HOMEPAGE.HTM