📄 que_058.htm
字号:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title>Ocp test </title>
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p align="left" color="black" style="font-size:16pt;">
<b>QUESTION 058 </b>
</p><hr color="#99CCFF">
<p>Examine the structure of the STUDENTS table:</p><table border="1" bordercolor="gray">
<tr>
<td align="left" width="486" bgcolor="#99CCFF">
<p><b>STUDENTS table: </b></p>
</td>
</tr>
<tr>
<td align="left" bgcolor="white">
<p><b>STUDENT_ID NUMBER NOT NULL, Primary Key </b></p>
</td>
</tr>
<tr>
<td align="left" bgcolor="white">
<p><b>STUDENT_NAME VARCHAR2(30) </b></p>
</td>
</tr>
<tr>
<td align="left" bgcolor="white">
<p><b>COURSE_ID VARCHAR2(10) NOT NULL </b></p>
</td>
</tr>
<tr>
<td align="left" bgcolor="white">
<p><b>MARKS NUMBER </b></p>
</td>
</tr>
<tr>
<td align="left" bgcolor="white">
<p><b>START_DATE DATE </b></p>
</td>
</tr>
<tr>
<td align="left" bgcolor="white">
<p><b>FINISH_DATE DATE </b></p>
</td>
</tr>
</table>
<p>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? </p><table border="1" bordercolor="gray" width="665">
<form name="youAnsForm">
<span style="font-size:18pt;">
<tr>
<td align="center" width="89">
<p><b><input type="radio" name="AN" value="A"> A.</b></p>
</td>
<td align="left" width="566">
<p> SELECT student_ id, marks, ROWNUM "Rank" <br>
FROM students <br>
WHERE ROWNUM <= 10 <br>
AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' <br>
AND course_id = 'INT_SQL' <br>
ORDER BY marks DESC;
</p>
</td>
</tr>
<tr>
<td align="center" width="89">
<p><b><input type="radio" name="AN" value="B"> B.</b></p>
</td>
<td align="left" width="566">
<p> SELECT student_id, marks, ROWID "Rank" <br>
FROM students <br>
WHERE ROWID <= 10 <br>
AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' <br>
AND course_id = 'INT_SQL' <br>
ORDER BY marks;
</p>
</td>
</tr>
<tr>
<td align="center" width="89">
<p><b><input type="radio" name="AN" value="C"> C.</b></p>
</td>
<td align="left" width="566">
<p> SELECT student_id, marks, ROWNUM "Rank" <br>
FROM (SELECT student_id, marks <br>
FROM students <br>
WHERE ROWNUM <= 10 <br>
AND finish_date BETWEEN '01-JAN-99' AND <br>
AND course_id = 'INT_SQL' <br>
ORDER BY marks DESC);
</p>
</td>
</tr>
<tr>
<td align="center" width="89">
<p><b><input type="radio" name="AN" value="D"> D.</b></p>
</td>
<td align="left" width="566">
<p> SELECT student_id, marks, ROWNUM "Rank" <br>
FROM (SELECT student_id, marks <br>
FROM students <br>
ORDER BY marks DESC) <br>
WHERE ROWNUM <= 10 <br>
AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99'AND course_id = 'INT_SQL';</b></p>
</td>
</tr>
</span>
</form>
</table>
</body>
</html>
<br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -