select * from ( select *,row_number() over ( order by time desc ) n from history ) hhh where hhh.n > 50000 and hhh.n <= 50010