SELECT subconjunto, MIN (ID), MAX (ID), COUNT (*)
FROM (SELECT object_id ID, NTILE (10) OVER (ORDER BY object_id) subconjunto
FROM all_objects)
GROUP BY subconjunto
SUBCONJUNTO MIN(ID) MAX(ID) COUNT(*)
----------- ---------- ---------- ----------
6 24579 29363 4785
7 29364 34148 4785
5 19794 24578 4785
8 34149 38938 4785
1 2 4931 4786
2 4932 10115 4786
3 10116 15008 4786
4 15009 19793 4785
9 38939 322991 4785
10 322992 361999 4785
No hay comentarios:
Publicar un comentario