Multiple choice technology databases

Top N analysis requires _____ and _____.

  1. the use of rowed

  2. a GROUP BY clause

  3. an ORDER BY clause

  4. only an inline view

  5. an inline view and an outer query

Reveal answer Fill a bubble to check yourself
C,E Correct answer
Explanation

Top-N analysis requires both an inline view (to order and rank the data) and an outer query (to limit the results to the top N rows). The inline view contains the ORDER BY clause to sort the data, and the outer query applies ROWNUM or a limiting clause to select only the top N. A GROUP BY clause is not required for Top-N analysis.