排名,rownum,Oracle查询

知道表t_img_code中数据总数totalCount,然后计算1%~99%所对应的排名数(rank(n)=n%*totalCount),查找排名所对应的costTime(表中另一个字段costTime),
select * from (select rownum rn,t.costTime from (select t.costTime from tt_img_code t order by costTime) t) where rn in (…);
其中“…”为1%~99%分别对应的排名数,以“,”分隔,这怎么写

max(rownum) as total

oracle的rownum并不是你想取哪行就取哪行的。
每次只能取n条连续记录(写法是:rownum<n,取0-n条记录)