How does a Top-N query work?

What will be an ideal response?

Top-N queries are used to sort rows in a table and then to find the first-N largest values or
first-N smallest values. For example, you want to find out the bottom 5 salaries in a
company, the top 3 room capacities, or the last 10 employees hired by a company.
The Top-N query uses an ORDER BY clause to sort rows in ascending or descending
order. The sorted rows are numbered with a pseudo-column named ROWNUM. If the
rows are sorted in ascending order by the Top-N column, the smallest value of the Top-N
column is at the top of the list. The largest value of the Top-N column is at the top of the
list if the rows are sorted in descending order by the Top-N column. You can display the
required number of rows based on the ROWNUM with < or >= operators. The > and>=
operators are not allowed with ROWNUM pseudocolumn.

Computer Science & Information Technology

You might also like to view...

A problem with pattern-matching is synonyms. If the current directory is bin and . denotes the current directory and .. its parent, then bin, ../bin, ../bin/., .././bin/../bin all denote the same directory. If you are trying to block access to the bin directory in a command script, you need to consider all these variants (and an infinite number more). Cite a means by which a pattern matching

algorithm copes with synonyms. What will be an ideal response?

Computer Science & Information Technology

Describe the sliding window flow control mechanism used in TCP.

What will be an ideal response?

Computer Science & Information Technology