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...

____ software is used to perform numerical analysis and enhance the appearance of data.?

A. ?Word processing B. ?Spreadsheet C. ?Presentation D. ?Database

Computer Science & Information Technology

Which of the following is true about an ideal hash function?

a. The ideal hash function has few collisions b. The ideal hash function sorts the hash table c. The ideal hash function has only one mathematical operation d. The ideal hash function can be re-used in open addressing

Computer Science & Information Technology

What is the biggest drawback of B Y O D for an organization?

What will be an ideal response?

Computer Science & Information Technology

Contiguous slides are slides that are adjacent to each other in the presentation

Indicate whether the statement is true or false

Computer Science & Information Technology