单项选择题

The STUDENT_GRADES table has these columns:
STUDENT_ID NUMBER(12)
SEMESTER_END DATE
GPA NUMBER(4,3)
The register has requested a report listing the students' grade point averages (GPA), sorted from highest grade point average to lowest within each semester, starting from the earliest date. Which statement accomplishes this?()

A.SELECT student_id, semester_end, gpa FROM student_grades ORDER BY semester_end DESC, gpa DESC;
B.SELECT student_id, semester_end, gpa FROM student_grades ORDER BY semester _end, ASC,gpa ASC;
C.SELECT student_id, semester_end, gpa FROM student_grades ORDER BY semester _end, gpa DESC;
D.SELECT student_id, semester_end, gpa FROM student_grades ORDER BY gpa DESC,semester_end DESC;
E.SELECT student_id, semester_end, gpa FROM student_grades


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题In a SELECT statement that includes a WHERE clause, where is the GROUP BY clause placed in the SELECT statement?()

A. Immediately after the SELECT clause
B. Before the WHERE clause
C. Before the FROM clause
D. After the ORDER BY clause
E. After the WHERE clause

2.多项选择题

Examine the SQL statements that creates ORDERS table:

For which columns would an index be automatically created when you execute the above SQL statement? ()

A. SER_NO
B. ORDER_ID
C. STATUS
D. PROD_ID
E. ORD_TOTAL
F. Composite index on ORDER_ID and ORDER_DATE

4.单项选择题Which statement explicitly names a constraint?()

A. ALTER TABLE student_grades   ADD   FOREIGN KEY (student_id) REFERENCES students(student_id);
B. ALTER TABLE student_grades   ADD CONSTRAINT NAME = student_id_fk   FOREIGN KEY (student_id) REFERENCES students(student_id);
C. ALTER TABLE student_grades   ADD CONSTRAINT student_id_fk   FOREIGN KEY (student_id) REFERENCES students(student_id);
D. ALTER TABLE student grades   ADD NAMED CONSTRAINT student_id_fk   FOREIGN KEY (student_id) REFERENCES students(student_id);
E. ALTER TABLE student grades   ADD NAME student_id_fk   FOREIGN KEY (student_id) REFERENCES students(student_id);

6.多项选择题Which two are true about aggregate functions? ()

A. You can use aggregate functions in any clause of a SELECT statement.
B. You can use aggregate functions only in the column list of the SELECT clause and in the WHERE clause of a SELECT statement.
C. You can mix single row columns with aggregate functions in the column list of a SELECT statement by grouping on the single row columns.
D. You can pass column names, expressions, constants, or functions as parameters to an aggregate function.
E. You can use aggregate functions on a table, only by grouping the whole table as one single group.
F. You cannot group the rows of a table by more than one column while using aggregate functions.

7.单项选择题Which /SQL*Plus feature can be used to replace values in the WHERE clause?()

A. Substitution variables
B. Replacement variables
C. Prompt variables
D. Instead-of variables
E. This feature cannot be implemented through /SQL*Plus

8.单项选择题

Examine the description of the MARKS table:

SUBJ1 and SUBJ2 indicate the marks obtained by a student in two subjects.
Examine this SELECT statement based on the MARKS table:

What is the result of the SELECT statement?()

A. The statement executes successfully and returns the student ID and sum of all marks for each student who obtained more than the average mark in each subject.
B. The statement returns an error at the SELECT clause.
C. The statement returns an error at the WHERE clause.
D. The statement returns an error at the ORDER BY clause.

9.单项选择题

Evaluate the SQL statement:

What will be displayed?()

A. 0
B. 1
C. 0.00
D. An error statement

10.单项选择题

The EMP table contains these columns:

You need to display the employees who have not been assigned to any department.
You write the SELECT statement:

What is true about this SQL statement?()

A. The SQL statement displays the desired results.
B. The column in the WHERE clause should be changed to display the desired results.
C. The operator in the WHERE clause should be changed to display the desired results.
D. The WHERE clause should be changed to use an outer join to display the desired results.