first sort the rows and then extract five rows from that sorted dataset.
SQL> select *
2 from (
3 select question_id, created
4 from asktom.ate_submitted_questions
5 order by created desc
6 )
7 where rownum <= 5;
Listing 4: Disk size of total sales transactions
SQL> select num_rows, blocks*8192/1024/1024 mb
2 from user_tables
3 where table_name = 'SALES_TRANSACTIONS';
NUM_ROWS MB
—————————— ——————————
10308870 1522.625
No hay comentarios:
Publicar un comentario