nerdexam
Oracle

1Z0-007 · Question #17

Examine the structure of the STUDENTS table: You need to create a report of the 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year 1999…

The correct answer is D. SELECT student_id, marks, ROWNUM "Rank". This statement using inline sub-query will provide correct results to show 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year Incorrect Answers A: This view will just show first 10 students from the STUDENTS table with…

Restricting and Sorting Data

Question

Examine the structure of the STUDENTS table:

You need to create a report of the 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year 1999. Which SQL statement accomplishes this task?

Exhibit

1Z0-007 question #17 exhibit

Options

  • ASELECT student_ id, marks, ROWNUM "Rank"
  • BSELECT student_id, marks, ROWID "Rank"
  • CSELECT student_id, marks, ROWNUM "Rank"
  • DSELECT student_id, marks, ROWNUM "Rank"

How the community answered

(52 responses)
  • A
    6% (3)
  • B
    8% (4)
  • C
    4% (2)
  • D
    83% (43)

Explanation

This statement using inline sub-query will provide correct results to show 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year Incorrect Answers A: This view will just show first 10 students from the STUDENTS table with limitation on the course INT SQL and who completed the course in the year 1999. B: It's wrong to use here ROWID to achieve desired results. C: This statement will provide wrong result due to wrong conditions in the inline sub-query.

Topics

#ROWNUM#top-N query#subquery#ORDER BY in subquery

Community Discussion

No community discussion yet for this question.

Full 1Z0-007 Practice