Which SQL statement accomplishes this task?

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?
A. SELECT . student_ id, marks, ROWNUM "Rank"
FROM . students
WHERE . ROWNUM <= 10
AND . finish_date BETWEEN ’01-JAN-99′ AND ’31-DEC-99
AND . course_id = ‘INT_SQL’
ORDER BY . marks DESC;
B. SELECT . student_id, marks, ROWID "Rank"
. FROM . students
. WHERE . ROWID <= 10
. AND . finish_date BETWEEN ’01-JAN-99′ AND ’31-DEC-99′
. AND . course_id = ‘INT_SQL’
. ORDER BY . marks;
C. SELECT . student_id, marks, ROWNUM "Rank"
. FROM . (SELECT student_id, marks
. FROM . students
. WHERE . ROWNUM <= 10
. AND . finish_date BETWEEN ’01-JAN-99′ AND ’31-DEC-
. 99′
. AND . course_id = ‘INT_SQL’
. ORDER BY . marks DESC);
D. SELECT . student_id, marks, ROWNUM "Rank”
. FROM . (SELECT student_id, marks
. FROM . students
. WHERE (finish_date BETWEEN ’01-JAN-99 AND ’31-DEC-99′
. AND course_id = ‘INT_SQL’
. ORDER BY marks DESC)
. WHERE . ROWNUM <= 10 ;
.
E. SELECT. student id, marks, ROWNUM “Rank”
. FROM. (SELECT student_id, marks
. FROM students
. ORDER BY marks)
. WHERE. ROWNUM <= 10
. AND. finish date BETWEEN ’01-JAN-99′ AND ’31-DEC-99′
. AND. course_id = ‘INT_SQL’;

Download Printable PDF. VALID exam to help you PASS.

2 thoughts on “Which SQL statement accomplishes this task?

  1. select first_name , salary,hire_date, rownum rank from employees
    where rownum <=10 and hire_date between '1-JAN-07' and '31-DEC-07' and department_id=60
    order by salary desc;

    select first_name , salary,hire_date, rownum rank
    from (select first_name , salary,hire_date from employees
    where hire_date between '1-JAN-07' and '31-DEC-07' and department_id=60
    order by salary desc)
    where rownum <=10 ;

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.