select * from (select * from (select a1.*,ROW_NUMBER() over(order by mid) as rows from Menu as a1) a2 where rows<=10) b where b.rows>=6