I'm doing a select from the bank and it's returning me 15 lines. I used ROWNUM to get the first 8 lines, but I want to make another select and pick up from line 9 to 15.
SELECT * FROM (SELECT DISTINCT o.STORAGE_TYPE, COUNT(o.QUANTIDADE) as
qtd_materiais
FROM mopsao.vw_monitoramento_do@MOPSAO m INNER JOIN VIEW_ORDENS_A_COLETAR o
ON
m.DELIVERY = o.DELIVERY AND m.cod_mat_c = o.MATERIAL WHERE
m.status_andamento = 'Pickado'
GROUP BY o.STORAGE_TYPE ORDER BY qtd_materiais DESC) WHERE ROWNUM <= 8
This first select as I described, take the first 8 lines.