Add support for this group by construct:

select a_s, sum(a_i) from collection1 where rownum < 10 group by a_s order by sum(a_i) asc