# CTE Resource Center - Verso - Database Design and Management (Oracle) Task 2052611719

CTE Resource Center - Verso

Virginia’s CTE Resource Center

Describe the procedures for performing a top-n analysis.

Definition

Description should include the concept that a top-n analysis displays only the top or bottom n records (with n representing an integer) from ordered sets of data (e.g., top five earners, last 10 employees, 25 best-selling products), and use the following syntax:
SELECT [column_list], ROWNUM [ROWNUM_ALIAS]
FROM (SELECT [column_list] FROM table ORDER BY Top-N column)
WHERE ROWNUM <=n;