How is top-n analysis performed?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

How is top-n analysis performed?

Rating:

Top-n analysis is performed using a top-n analysis query. Following is the structure of a top-n analysis query:

SELECT [column_list], ROWNUM
FROM (SELECT [column_list] FROM table
ORDER BY top-n_column)
WHERE ROWNUM <= n;


A top-n analysis query comprises the following elements:

  • A subquery or an inline view that generates the sorted list of records, and includes an ORDER BY clause to ensure that the ranking is in the desired order.

  • An outer (main) query that limits the number of rows in the final result set, and includes the ROWNUM pseudocolumn and a WHERE clause. The ROWNUM assigns a sequential value, starting with 1, to each row returned by the subquery. The WHERE clause limits the number of rows to be displayed.

  • Rating:



    Other articles

    Click here to Article home

     
    uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
    MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
    Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
    © 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.