多项选择题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.


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题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

2.单项选择题

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.

3.单项选择题

Evaluate the SQL statement:

What will be displayed?()

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

4.单项选择题

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.

5.单项选择题

The STUDENT_GRADES table has these columns:
STUDENT_ID NUMBER(12)
SEMESTER_END DATE
GPA NUMBER(4,3)
The registrar has asked for a report on the average grade point average (GPA) for students enrolled during semesters that end in the year 2000. Which statement accomplish this?()

A. SELECT AVERAGE(gpa) FROM student_grades WHERE semester _ end > '01-JAN-2000' and semester end <31-DEC-2000';
B. SELECT COUNT(gpa) FROM student grades WHERE semester _ end > '01-JAN-2000' and semester end <31-DEC-2000';
C. SELECT MIN(gpa) FROM student grades WHERE semester _ end > '01-JAN-2000' and semester end <31-DEC-2000';
D. SELECT AVG(gpa) FROM student_grades WHERE semester _ end BETWEEN '01-JAN-2000' and '31-DEC-2000';
E. SELECT SUM(gpa) FROM student grades WHERE semester _ end > '01-JAN-2000' and semester end <31-DEC-2000';
F. SELECT MEDIAN(gpa) FROM student_grades WHERE semester _ end > '01-JAN-2000' and semester end <31-DEC-2000';

6.单项选择题

Examine the structure if the EMPLOYEES table:
Column name Data Type Remarks
EMPLOYEE_ID NUMBER NOT NULL, Primary Key
EMP_NAME VARCHAR2(30)
JOB_ID VARCHAR2(20) NOT NULL
SAL NUMBER
MGR_ID NUMBER References EMPLOYEE_ID column
DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID
column of the DEPARTMENTS table
You need to create a view called EMP_VU that allows the user to insert rows through the view. Which SQL statement, when used to create the EMP_VU view, allows the user to insert rows?()

A. CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, department_id FROM employees WHERE mgr_id IN (102, 120);
B. CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id department_id FROM employees WHERE mgr_id IN (102, 120);
C. CREATE VIEW emp_Vu AS SELECT department_id, SUM(sal) TOTALSAL FROM employees WHERE mgr_id IN (102, 120) GROUP BY department_ id;
D. CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id, DISTINCT department_id FROM employees;

8.单项选择题

Examine the description of the EMPLOYEES table:
EMP_ID NUMBER(4) NOT NULL
LAST_NAME VARCHAR2(30) NOT NULL
FIRST_NAME VARCHAR2(30)
DEPT_ID NUMBER(2)
JOB_CAT VARCHAR2(30)
SALARY NUMBER(8,2)
Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only of the minimum salary is less then 5000 and the maximum salary is more than 15000?()

A. SELECT dept_id, MIN(salary(, MAX(salary) FROM employees WHERE MIN(salary) <5000 AND MAX (salary) > 15000;
B. SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000 GROUP BY dept_id;
C. SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) <5000 AND MAX (salary) > 15000;
D. SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN (salary) < 5000 AND MAX(salary)
E. SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN (salary) <5000 AND MAX (salary) > 15000;

9.多项选择题

Examine the structure of the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables.
EMPLOYEES
NOT NULL,
EMPLOYEE_ID NUMBER
Primary Key
VARCHAR2
EMP_NAME
(30)
VARCHAR2
JOB_ID
(20)
SALARY NUMBER
References
MGR_ID NUMBER
EMPLOYEE_ID
column
DEPARTMENT_ID NUMBER Foreign key to
DEPARTMENT_ID
column of the
DEPARTMENTS
table
DEPARTMENTS
NOT NULL, Primary
DEPARTMENT_ID NUMBER
Key
VARCHAR2
DEPARTMENT_NAME
(30)
References NGR_ID
MGR_ID NUMBER
column of
the EMPLOYEES table
Foreign key to
LOCATION_ID NUMBER
LOCATION_ID
column of the
LOCATIONS table
LOCATIONS
NOT NULL, Primary
LOCATION_ID NUMBER
Key
VARCHAR2
CITY
|30)
Which two SQL statements produce the name, department name, and the city of all the employees who earn more then 10000?()

A. SELECT emp_name, department_name, city FROM employees e JOIN departments d USING (department_id) JOIN locations 1 USING (location_id) WHERE salary > 10000;
B. SELECT emp_name, department_name, city FROM employees e, departments d, locations 1 JOIN ON (e.department_id = d.department id) AND (d.location_id =1.location_id) AND salary > 10000;
C. SELECT emp_name, department_name, city FROM employees e, departments d, locations 1 WHERE salary > 10000;
D. SELECT emp_name, department_name, city FROM employees e, departments d, locations 1 WHERE e.department_id = d.department_id AND d.location_id = 1.location_id AND salary > 10000;
E. SELECT emp_name, department_name, city FROM employees e NATURAL JOIN departments, locations WHERE salary > 10000;

10.单项选择题Which data dictionary table should you query to view the object privileges granted to the user on specific columns?()

A. USER_TAB_PRIVS_MADE
B. USER_TAB_PRIVS
C. USER_COL_PRIVS_MADE
D. USER_COL_PRIVS

最新试题

Evaluate this SQL statement:SELECT e.emp_name, d.dept_nameFROM employees eJOIN departments dUSING (department_id)WHERE d.department_id NOT IN (10,40)ORSER BY dept_name;The statement fails when executed. Which change fixes the error? ()

题型:单项选择题

What is true regarding subqueries?()

题型:单项选择题

Which view should a user query to display the columns associated with the constraints on a table owned by the user? ()

题型:单项选择题

Which are /SQL*Plus commands? ()

题型:多项选择题

You need to perform these tasks:1. Create and assign a MANAGER role to Blake and Clark2. Grant CREATE TABLE and CREATE VIEW privileges to Blake and ClarkWhich set of SQL statements achieves the desired results? ()

题型:单项选择题

Which two statements are true about constraints? ()

题型:多项选择题

Which four are types of functions available in SQL? ()

题型:多项选择题

The user Alice wants to grant all users query privileges on her DEPT table. Which SQL statement accomplishes this? ()

题型:单项选择题

User Mary has a view called EMP_DEPT_LOC_VU that was created based on the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. She has the privilege to create a public synonym, and would like to create a synonym for this view that can be used by all users of the database. Which SQL statement can Mary use to accomplish that task?()

题型:单项选择题

Which is a valid CREATE TABLE statement? ()

题型:单项选择题