Top-n queries ask for the n largest or smallest values of a column. Such queries
are solved in ORACLE using the pseudo-attribute ROWNUM which assigns a value
starting with 1 to each of the rows returned by a subquery. Thus, a top-n query
in SQL Plus requires the following elements:
1. a subquery containing the order by clause that ensures that the rows
retrieved by the subquery are placed in the proper order;
2. the main query that includes the ROWNUM pseudo-attribute and may include
a where clause to specify the number of returned rows.