http://quizoracle.blogspot.com/2010/10/mid-term-exam-semester-2-i.html

  1. Test: Mid Term Exam Semester 2 – Part II
  2. Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
  3.         Semester 2 Mid Term Exam Part II covers Sections 5-7 of Database Programming with SQL.
  4.         Section 6
  5.                 31.     The Oracle server performs a correlated subquery when the subquery references a column from a table referred to in the parent. True or False?   Mark for Review
  6. (1) Points
  7.         True (*)
  8.         False
  9. Correct         Correct
  10.                 32.     The WITH clause enables a SELECT statement to define the subquery block at the start of the query, process the block just once, label the results, and then refer to the results multiple times. True or False? Mark for Review
  11. (1) Points
  12.         True (*)
  13.         False
  14. Correct         Correct
  15.                 33.     A correlated subquery will _______ a candidate row from an outer query, _______ the inner query using candidate row value, and _______ values from the inner query to qualify or disqualify the candidate row.  Mark for Review
  16. (1) Points
  17.         CREATE; EXECUTE; USE
  18.         DELETE; UPDATE; INSERT
  19.         GET; EXECUTE; USE (*)
  20.         ROLLUP; GRANT; DROP
  21. Incorrect               Incorrect. Refer to Section 6 Lesson 4.
  22.                 34.     Oracle allows you to write named subqueries in one single statement, as long as you start your statement with the keyword WITH. True or False?  Mark for Review
  23. (1) Points
  24.         True (*)
  25.         False
  26. Correct         Correct
  27.                 35.     Which statement about the <> operator is true?  Mark for Review
  28. (1) Points
  29.         The <> operator is NOT a valid SQL operator.
  30.         The <> operator CANNOT be used in a single-row subquery.
  31.         The <> operator returns the same result as the ANY operator in a subquery.
  32.         The <> operator can be used when a single-row subquery returns only one row. (*)
  33. Incorrect               Incorrect. Refer to Section 6 Lesson 2.
  34.                 36.     Which best describes a single-row subquery?     Mark for Review
  35. (1) Points
  36.         A query that returns only one row from the inner SELECT statement (*)
  37.         A query that returns one or more rows from the inner SELECT statement
  38.         A query that returns only one column value from the inner SELECT statement
  39.         A query that returns one or more column values from the inner SELECT statement
  40. Correct         Correct
  41.         Section 7
  42.                 37.     You need to delete a record in the EMPLOYEES table for Tim Jones, whose unique employee identification number is 348. The EMPLOYEES table contains these columns:
  43. EMPLOYEE_ID NUMBER(5) PRIMARY KEY
  44. LAST_NAME VARCHAR2(20)
  45. FIRST_NAME VARCHAR2(20)
  46. ADDRESS VARCHAR2(30)
  47. PHONE NUMBER(10)
  48. Which DELETE statement will delete the appropriate record without deleting any additional records?
  49.         Mark for Review
  50. (1) Points
  51.         DELETE FROM employees
  52. WHERE employee_id = 348;
  53. (*)
  54.         DELETE FROM employees
  55. WHERE last_name = jones;
  56.         DELETE *
  57. FROM employees
  58. WHERE employee_id = 348;
  59.         DELETE ‘jones’
  60. FROM employees;
  61. Correct         Correct
  62.                 38.     Examine the structures of the PRODUCTS and SUPPLIERS tables:
  63. SUPPLIERS
  64. SUPPLIER_ID NUMBER NOT NULL, Primary Key
  65. SUPPLIER_NAME VARCHAR2 (25)
  66. ADDRESS VARCHAR2 (30)
  67. CITY VARCHAR2 (25)
  68. REGION VARCHAR2 (10)
  69. POSTAL_CODE VARCHAR2 (11)
  70. PRODUCTS
  71. PRODUCT_ID NUMBER NOT NULL, Primary Key
  72. PRODUCT_NAME VARCHAR2 (25)
  73. SUPPLIER_ID NUMBER Foreign key to SUPPLIER_ID of the SUPPLIERS table
  74. CATEGORY_ID NUMBER
  75. QTY_PER_UNIT NUMBER
  76. UNIT_PRICE NUMBER (7,2)
  77. QTY_IN_STOCK NUMBER
  78. QTY_ON_ORDER NUMBER
  79. REORDER_LEVEL NUMBER
  80. You want to delete any products supplied by the five suppliers located in Atlanta. Which script should you use?
  81.         Mark for Review
  82. (1) Points
  83.         DELETE FROM products
  84. WHERE supplier_id IN
  85. (SELECT supplier_id FROM suppliers WHERE UPPER(city) = ‘ATLANTA’);
  86. (*)
  87.         DELETE FROM products
  88. WHERE UPPER(city) = ‘ATLANTA’;
  89.         DELETE FROM products
  90. WHERE supplier_id =
  91. (SELECT supplier_id FROM suppliers WHERE UPPER(city) = ‘ATLANTA’);
  92.         DELETE FROM suppliers
  93. WHERE supplier_id IN
  94. (SELECT supplier_id FROM suppliers WHERE UPPER(city) = ‘ALANTA’);
  95. Correct         Correct
  96.                 39.     The EMPLOYEES table contains the following columns:
  97. EMPLOYEE_ID NUMBER(10) PRIMARY KEY
  98. LAST_NAME VARCHAR2(20)
  99. FIRST_NAME VARCHAR2(20)
  100. DEPTARTMENT_ID VARCHAR2(20)
  101. HIRE_DATE DATE
  102. SALARY NUMBER(9,2)
  103. BONUS NUMBER(9,2)
  104. You need to increase the salary for all employees in department 10 by 10 percent. You also need to increase the bonus for all employees in department 10 by 15 percent. Which statement should you use?
  105.         Mark for Review
  106. (1) Points
  107.         UPDATE employees
  108. SET salary = salary * 1.10, bonus = bonus * 1.15
  109. WHERE department_id = 10;
  110. (*)
  111.         UPDATE employees
  112. SET salary = salary * 1.10 AND bonus = bonus * 1.15
  113. WHERE department_id = 10;
  114.         UPDATE employees
  115. SET (salary = salary * 1.10) SET (bonus = bonus * 1.15)
  116. WHERE department_id = 10;
  117.         UPDATE employees
  118. SET salary = salary * .10, bonus = bonus * .15
  119. WHERE department_id = 10;
  120. Correct         Correct
  121.                 40.     You need to update the expiration date of products manufactured before June 30th . In which clause of the UPDATE statement will you specify this condition?     Mark for Review
  122. (1) Points
  123.         The ON clause
  124.         The WHERE clause (*)
  125.         The SET clause
  126.         The USING clause
  127. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  128.         Section 7
  129.                 41.     You need to remove a row from the EMPLOYEES table. Which statement would you use?       Mark for Review
  130. (1) Points
  131.         UPDATE with a WHERE clause
  132.         INSERT with a WHERE clause
  133.         DELETE with a WHERE clause (*)
  134.         MERGE with a WHERE clause
  135. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  136.                 42.     The PLAYERS table contains these columns:
  137. PLAYER_ID NUMBER NOT NULL
  138. PLAYER_LNAME VARCHAR2(20) NOT NULL
  139. PLAYER_FNAME VARCHAR2(10) NOT NULL
  140. TEAM_ID NUMBER
  141. SALARY NUMBER(9,2)
  142. You need to increase the salary of each player for all players on the Tiger team by 12.5 percent. The TEAM_ID value for the Tiger team is 5960. Which statement should you use?
  143.         Mark for Review
  144. (1) Points
  145.         UPDATE players (salary)
  146. SET salary = salary * 1.125;
  147.         UPDATE players
  148. SET salary = salary * .125
  149. WHERE team_id = 5960;
  150.         UPDATE players
  151. SET salary = salary * 1.125
  152. WHERE team_id = 5960;
  153. (*)
  154.         UPDATE players (salary)
  155. VALUES(salary * 1.125)
  156. WHERE team_id = 5960;
  157. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  158.                 43.     What would happen if you issued a DELETE statement without a WHERE clause?      Mark for Review
  159. (1) Points
  160.         All the rows in the table would be deleted. (*)
  161.         An error message would be returned.
  162.         No rows would be deleted.
  163.         Only one row would be deleted.
  164. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  165.                 44.     You need to update both the DEPARTMENT_ID and LOCATION_ID columns in the EMPLOYEES table using one UPDATE statement. Which clause should you include in the UPDATE statement to update multiple columns?        Mark for Review
  166. (1) Points
  167.         The USING clause
  168.         The ON clause
  169.         The WHERE clause
  170.         The SET clause (*)
  171. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  172.                 45.     You need to update the area code of employees that live in Atlanta. Evaluate this partial UPDATE statement:
  173. UPDATE employee
  174. SET area_code = 770
  175. Which of the following should you include in your UPDATE statement to achieve the desired results?
  176.         Mark for Review
  177. (1) Points
  178.         UPDATE city = Atlanta;
  179.         SET city = ‘Atlanta’;
  180.         WHERE city = ‘Atlanta’; (*)
  181.         LIKE ‘At%’;
  182. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  183.                 46.     Examine the structures of the PLAYERS, MANAGERS, and TEAMS tables:
  184. PLAYERS
  185. PLAYER_ID NUMBER Primary Key
  186. LAST_NAME VARCHAR2 (30)
  187. FIRST_NAME VARCHAR2 (25)
  188. TEAM_ID NUMBER
  189. MGR_ID NUMBER
  190. SIGNING_BONUS NUMBER(9,2)
  191. SALARY NUMBER(9,2)
  192. MANAGERS
  193. MANAGER_ID NUMBER Primary Key
  194. LAST_NAME VARCHAR2 (20)
  195. FIRST_NAME VARCHAR2 (20)
  196. TEAM_ID NUMBER
  197. TEAMS
  198. TEAM_ID NUMBER Primary Key
  199. TEAM_NAME VARCHAR2 (20)
  200. OWNER_LAST_NAME VARCHAR2 (20)
  201. OWNER_FIRST_NAME VARCHAR2 (20)
  202. Which situation would require a subquery to return the desired result?
  203.         Mark for Review
  204. (1) Points
  205.         To display the names each player on the Lions team
  206.         To display the maximum and minimum player salary for each team
  207.         To display the names of the managers for all the teams owned by a given owner (*)
  208.         To display each player, their manager, and their team name for all teams with a id value greater than 5000
  209. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  210.                 47.     You need to copy rows from the EMPLOYEE table to the EMPLOYEE_HIST table. What could you use in the INSERT statement to accomplish this task?   Mark for Review
  211. (1) Points
  212.         An ON clause
  213.         A SET clause
  214.         A subquery (*)
  215.         A function
  216. Incorrect               Incorrect. Refer to Section 7 Lesson 1.
  217.                 48.     The STUDENTS table contains these columns:
  218. STU_ID NUMBER(9) NOT NULL
  219. LAST_NAME VARCHAR2 (30) NOT NULL
  220. FIRST_NAME VARCHAR2 (25) NOT NULL
  221. DOB DATE
  222. STU_TYPE_ID VARCHAR2(1) NOT NULL
  223. ENROLL_DATE DATE
  224. You create another table, named FT_STUDENTS, with an identical structure.You want to insert all full-time students, who have a STU_TYPE_ID value of “F”, into the new table. You execute this INSERT statement:
  225. INSERT INTO ft_students
  226.    (SELECT stu_id, last_name, first_name, dob, stu_type_id, enroll_date
  227. FROM students
  228. WHERE UPPER(stu_type_id) = ‘F’);
  229. What is the result of executing this INSERT statement?
  230.         Mark for Review
  231. (1) Points
  232.         All full-time students are inserted into the FT_STUDENTS table. (*)
  233.         An error occurs because the FT_STUDENTS table already exists.
  234.         An error occurs because you CANNOT use a subquery in an INSERT statement.
  235.         An error occurs because the INSERT statement does NOT contain a VALUES clause.
  236. Correct         Correct
  237.                 49.     You need to add a row to an existing table. Which DML statement should you use?         Mark for Review
  238. (1) Points
  239.         UPDATE
  240.         INSERT (*)
  241.         DELETE
  242.         CREATE
  243. Incorrect               Incorrect. Refer to Section 7 Lesson 1.
  244.                 50.     The PRODUCTS table contains these columns:
  245. PROD_ID NUMBER(4)
  246. PROD_NAME VARCHAR2(25)
  247. PROD_PRICE NUMBER(3)
  248. You want to add the following row data to the PRODUCTS table:
  249. (1) a NULL value in the PROD_ID column
  250. (2) “6-foot nylon leash” in the PROD_NAME column
  251. (3) “10″ in the PROD_PRICE column
  252. You issue this statement:
  253. INSERT INTO products
  254. VALUES (null,’6-foot nylon leash’, 10);
  255. What row data did you add to the table?
  256.         Mark for Review
  257. (1) Points
  258.         The row was created with the correct data in all three columns. (*)
  259.         The row was created with the correct data in two of three columns.
  260.         The row was created with the correct data in one of the three columns.
  261.         The row was created completely wrong. No data ended up in the correct columns.

Test: Mid Term Exam Semester 2 – Part II
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Semester 2 Mid Term Exam Part II covers Sections 5-7 of Database Programming with SQL.
Section 6

31. The Oracle server performs a correlated subquery when the subquery references a column from a table referred to in the parent. True or False? Mark for Review
(1) Points

True (*)

False

Correct Correct

32. The WITH clause enables a SELECT statement to define the subquery block at the start of the query, process the block just once, label the results, and then refer to the results multiple times. True or False? Mark for Review
(1) Points

True (*)

False

Correct Correct

33. A correlated subquery will _______ a candidate row from an outer query, _______ the inner query using candidate row value, and _______ values from the inner query to qualify or disqualify the candidate row. Mark for Review
(1) Points

CREATE; EXECUTE; USE

DELETE; UPDATE; INSERT

GET; EXECUTE; USE (*)

ROLLUP; GRANT; DROP

Incorrect Incorrect. Refer to Section 6 Lesson 4.

34. Oracle allows you to write named subqueries in one single statement, as long as you start your statement with the keyword WITH. True or False? Mark for Review
(1) Points

True (*)

False

Correct Correct

35. Which statement about the <> operator is true? Mark for Review
(1) Points

The <> operator is NOT a valid SQL operator.

The <> operator CANNOT be used in a single-row subquery.

The <> operator returns the same result as the ANY operator in a subquery.

The <> operator can be used when a single-row subquery returns only one row. (*)

Incorrect Incorrect. Refer to Section 6 Lesson 2.

36. Which best describes a single-row subquery? Mark for Review
(1) Points

A query that returns only one row from the inner SELECT statement (*)

A query that returns one or more rows from the inner SELECT statement

A query that returns only one column value from the inner SELECT statement

A query that returns one or more column values from the inner SELECT statement

Correct Correct

Section 7

37. You need to delete a record in the EMPLOYEES table for Tim Jones, whose unique employee identification number is 348. The EMPLOYEES table contains these columns:

EMPLOYEE_ID NUMBER(5) PRIMARY KEY
LAST_NAME VARCHAR2(20)
FIRST_NAME VARCHAR2(20)
ADDRESS VARCHAR2(30)
PHONE NUMBER(10)

Which DELETE statement will delete the appropriate record without deleting any additional records?
Mark for Review
(1) Points

DELETE FROM employees
WHERE employee_id = 348;

(*)

DELETE FROM employees
WHERE last_name = jones;

DELETE *
FROM employees
WHERE employee_id = 348;

DELETE ‘jones’
FROM employees;

Correct Correct

38. Examine the structures of the PRODUCTS and SUPPLIERS tables:

SUPPLIERS
SUPPLIER_ID NUMBER NOT NULL, Primary Key
SUPPLIER_NAME VARCHAR2 (25)
ADDRESS VARCHAR2 (30)
CITY VARCHAR2 (25)
REGION VARCHAR2 (10)
POSTAL_CODE VARCHAR2 (11)

PRODUCTS
PRODUCT_ID NUMBER NOT NULL, Primary Key
PRODUCT_NAME VARCHAR2 (25)
SUPPLIER_ID NUMBER Foreign key to SUPPLIER_ID of the SUPPLIERS table
CATEGORY_ID NUMBER
QTY_PER_UNIT NUMBER
UNIT_PRICE NUMBER (7,2)
QTY_IN_STOCK NUMBER
QTY_ON_ORDER NUMBER
REORDER_LEVEL NUMBER

You want to delete any products supplied by the five suppliers located in Atlanta. Which script should you use?
Mark for Review
(1) Points

DELETE FROM products
WHERE supplier_id IN
(SELECT supplier_id FROM suppliers WHERE UPPER(city) = ‘ATLANTA’);

(*)

DELETE FROM products
WHERE UPPER(city) = ‘ATLANTA’;

DELETE FROM products
WHERE supplier_id =
(SELECT supplier_id FROM suppliers WHERE UPPER(city) = ‘ATLANTA’);

DELETE FROM suppliers
WHERE supplier_id IN
(SELECT supplier_id FROM suppliers WHERE UPPER(city) = ‘ALANTA’);

Correct Correct

39. The EMPLOYEES table contains the following columns:

EMPLOYEE_ID NUMBER(10) PRIMARY KEY
LAST_NAME VARCHAR2(20)
FIRST_NAME VARCHAR2(20)
DEPTARTMENT_ID VARCHAR2(20)
HIRE_DATE DATE
SALARY NUMBER(9,2)
BONUS NUMBER(9,2)

You need to increase the salary for all employees in department 10 by 10 percent. You also need to increase the bonus for all employees in department 10 by 15 percent. Which statement should you use?
Mark for Review
(1) Points

UPDATE employees
SET salary = salary * 1.10, bonus = bonus * 1.15
WHERE department_id = 10;

(*)

UPDATE employees
SET salary = salary * 1.10 AND bonus = bonus * 1.15
WHERE department_id = 10;

UPDATE employees
SET (salary = salary * 1.10) SET (bonus = bonus * 1.15)
WHERE department_id = 10;

UPDATE employees
SET salary = salary * .10, bonus = bonus * .15
WHERE department_id = 10;

Correct Correct

40. You need to update the expiration date of products manufactured before June 30th . In which clause of the UPDATE statement will you specify this condition? Mark for Review
(1) Points

The ON clause

The WHERE clause (*)

The SET clause

The USING clause

Incorrect Incorrect. Refer to Section 7 Lesson 2.
Section 7

41. You need to remove a row from the EMPLOYEES table. Which statement would you use? Mark for Review
(1) Points

UPDATE with a WHERE clause

INSERT with a WHERE clause

DELETE with a WHERE clause (*)

MERGE with a WHERE clause

Incorrect Incorrect. Refer to Section 7 Lesson 2.

42. The PLAYERS table contains these columns:

PLAYER_ID NUMBER NOT NULL
PLAYER_LNAME VARCHAR2(20) NOT NULL
PLAYER_FNAME VARCHAR2(10) NOT NULL
TEAM_ID NUMBER
SALARY NUMBER(9,2)

You need to increase the salary of each player for all players on the Tiger team by 12.5 percent. The TEAM_ID value for the Tiger team is 5960. Which statement should you use?
Mark for Review
(1) Points

UPDATE players (salary)
SET salary = salary * 1.125;

UPDATE players
SET salary = salary * .125
WHERE team_id = 5960;

UPDATE players
SET salary = salary * 1.125
WHERE team_id = 5960;

(*)

UPDATE players (salary)
VALUES(salary * 1.125)
WHERE team_id = 5960;

Incorrect Incorrect. Refer to Section 7 Lesson 2.

43. What would happen if you issued a DELETE statement without a WHERE clause? Mark for Review
(1) Points

All the rows in the table would be deleted. (*)

An error message would be returned.

No rows would be deleted.

Only one row would be deleted.

Incorrect Incorrect. Refer to Section 7 Lesson 2.

44. You need to update both the DEPARTMENT_ID and LOCATION_ID columns in the EMPLOYEES table using one UPDATE statement. Which clause should you include in the UPDATE statement to update multiple columns? Mark for Review
(1) Points

The USING clause

The ON clause

The WHERE clause

The SET clause (*)

Incorrect Incorrect. Refer to Section 7 Lesson 2.

45. You need to update the area code of employees that live in Atlanta. Evaluate this partial UPDATE statement:

UPDATE employee
SET area_code = 770

Which of the following should you include in your UPDATE statement to achieve the desired results?
Mark for Review
(1) Points

UPDATE city = Atlanta;

SET city = ‘Atlanta’;

WHERE city = ‘Atlanta’; (*)

LIKE ‘At%’;

Incorrect Incorrect. Refer to Section 7 Lesson 2.

46. Examine the structures of the PLAYERS, MANAGERS, and TEAMS tables:

PLAYERS
PLAYER_ID NUMBER Primary Key
LAST_NAME VARCHAR2 (30)
FIRST_NAME VARCHAR2 (25)
TEAM_ID NUMBER
MGR_ID NUMBER
SIGNING_BONUS NUMBER(9,2)
SALARY NUMBER(9,2)

MANAGERS
MANAGER_ID NUMBER Primary Key
LAST_NAME VARCHAR2 (20)
FIRST_NAME VARCHAR2 (20)
TEAM_ID NUMBER

TEAMS
TEAM_ID NUMBER Primary Key
TEAM_NAME VARCHAR2 (20)
OWNER_LAST_NAME VARCHAR2 (20)
OWNER_FIRST_NAME VARCHAR2 (20)

Which situation would require a subquery to return the desired result?
Mark for Review
(1) Points

To display the names each player on the Lions team

To display the maximum and minimum player salary for each team

To display the names of the managers for all the teams owned by a given owner (*)

To display each player, their manager, and their team name for all teams with a id value greater than 5000

Incorrect Incorrect. Refer to Section 7 Lesson 2.

47. You need to copy rows from the EMPLOYEE table to the EMPLOYEE_HIST table. What could you use in the INSERT statement to accomplish this task? Mark for Review
(1) Points

An ON clause

A SET clause

A subquery (*)

A function

Incorrect Incorrect. Refer to Section 7 Lesson 1.

48. The STUDENTS table contains these columns:

STU_ID NUMBER(9) NOT NULL
LAST_NAME VARCHAR2 (30) NOT NULL
FIRST_NAME VARCHAR2 (25) NOT NULL
DOB DATE
STU_TYPE_ID VARCHAR2(1) NOT NULL
ENROLL_DATE DATE

You create another table, named FT_STUDENTS, with an identical structure.You want to insert all full-time students, who have a STU_TYPE_ID value of “F”, into the new table. You execute this INSERT statement:

INSERT INTO ft_students
(SELECT stu_id, last_name, first_name, dob, stu_type_id, enroll_date
FROM students
WHERE UPPER(stu_type_id) = ‘F’);

What is the result of executing this INSERT statement?
Mark for Review
(1) Points

All full-time students are inserted into the FT_STUDENTS table. (*)

An error occurs because the FT_STUDENTS table already exists.

An error occurs because you CANNOT use a subquery in an INSERT statement.

An error occurs because the INSERT statement does NOT contain a VALUES clause.

Correct Correct

49. You need to add a row to an existing table. Which DML statement should you use? Mark for Review
(1) Points

UPDATE

INSERT (*)

DELETE

CREATE

Incorrect Incorrect. Refer to Section 7 Lesson 1.

50. The PRODUCTS table contains these columns:

PROD_ID NUMBER(4)
PROD_NAME VARCHAR2(25)
PROD_PRICE NUMBER(3)

You want to add the following row data to the PRODUCTS table:

(1) a NULL value in the PROD_ID column
(2) “6-foot nylon leash” in the PROD_NAME column
(3) “10″ in the PROD_PRICE column

You issue this statement:

INSERT INTO products
VALUES (null,’6-foot nylon leash’, 10);

What row data did you add to the table?
Mark for Review
(1) Points

The row was created with the correct data in all three columns. (*)

The row was created with the correct data in two of three columns.

The row was created with the correct data in one of the three columns.

The row was created completely wrong. No data ended up in the correct columns.

Correct Correct

est: Mid Term Exam Semester 2 – Part II
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Semester 2 Mid Term Exam Part II covers Sections 5-7 of Database Programming with SQL.
Section 5

1. You use GROUPING function to: Mark for Review
(1) Points

Produce subtotal and cross-tabulated values

Identify the extra row values created by either a ROLLUP or CUBE operation (*)

Aggregate rows using SUM, MIN, MAX, and COUNT

Correct Correct

2. GROUPING SETS is another extension to the GROUP BY clause and is used to specify multiple groupings of data but provide a single result set. True or False? Mark for Review
(1) Points

True (*)

False

Incorrect Incorrect. Refer to Section 5 Lesson 2.

3. You use GROUPING function to ______ database rows from tabulated rows. Mark for Review
(1) Points

CREATE

DISTINGUISH (*)

COMPUTE

COUNT

Incorrect Incorrect. Refer to Section 5 Lesson 2.

4. CUBE will cross-reference the columns listed in the ______ clause to create a superset of groups. Mark for Review
(1) Points

GROUP BY (*)

WHERE

SELECT

Correct Correct

5. Group functions can be nested to a depth of? Mark for Review
(1) Points

Three

Four

Two (*)

Group functions cannot be nested.

Correct Correct

6. The PRODUCTS table contains these columns:

PROD_ID NUMBER(4)
PROD_NAME VARCHAR(20)
PROD_CAT VARCHAR2(15)
PROD_PRICE NUMBER(5)
PROD_QTY NUMBER(4)

You need to identify the minimum product price in each product category.
Which statement could you use to accomplish this task?
Mark for Review
(1) Points

SELECT prod_cat, MIN (prod_price)
FROM products
GROUP BY prod_price;

SELECT prod_cat, MIN (prod_price)
FROM products
GROUP BY prod_cat;

(*)

SELECT MIN (prod_price), prod_cat
FROM products
GROUP BY MIN (prod_price), prod_cat;

SELECT prod_price, MIN (prod_cat)
FROM products
GROUP BY prod_cat;

Incorrect Incorrect. Refer to Section 5 Lesson 1.

7. Evaluate this SELECT statement:

SELECT COUNT(emp_id), mgr_id, dept_id
FROM employees
WHERE status = ‘I’
GROUP BY dept_id
HAVING salary > 30000
ORDER BY 2;

Why does this statement return a syntax error?
Mark for Review
(1) Points

MGR_ID must be included in the GROUP BY clause. (*)

The HAVING clause must specify an aggregate function.

A single query cannot contain a WHERE clause and a HAVING clause.

The ORDER BY clause must specify a column name in the EMPLOYEE table.

Incorrect Incorrect. Refer to Section 5 Lesson 1.

8. Which statement about group functions is true? Mark for Review
(1) Points

Group functions ignore null values. (*)

Group functions can only be used in a SELECT list.

Group functions can be used in a WHERE clause.

A query that includes a group function in the SELECT list must include a GROUP BY clause.

Incorrect Incorrect. Refer to Section 5 Lesson 1.

9. The EMPLOYEES table contains the following columns:

EMPLOYEE_ID NUMBER(10) PRIMARY KEY
LAST_NAME VARCHAR2(20)
FIRST_NAME VARCHAR2(20)
DEPARTMENT VARCHAR2(20)
HIRE_DATE DATE
SALARY NUMBER(10)

You want to create a report that includes each employee’s last name, employee identification number, date of hire and salary. The report should include only those employees who have been with the company for more than one year and whose salary exceeds $40,000.

Which of the following SELECT statements will accomplish this task?
Mark for Review
(1) Points

SELECT employee_id, last_name, salary
FROM employees
WHERE salary > 40000
AND hire_date =
(SELECT hire_date
FROM employees
WHERE (sysdate-hire_date) / 365 > 1);

SELECT employee_id, last_name, hire_date, salary
FROM employees
WHERE salary > 40000 AND hire_date =
(SELECT hire_date
FROM employees
WHERE (sysdate-hire_date) / 365 > 1);

SELECT employee_id, last_name, hire_date, salary
FROM employees
WHERE salary > 40000
AND (sysdate-hire_date) / 365 > 1;

(*)

SELECT employee_id, last_name, salary
FROM employees
WHERE salary > 40000
AND hire_date IN (sysdate-hire_date) / 365 > 1);

Incorrect Incorrect. Refer to Section 5 Lesson 1.

10. What will the following SQL Statement do?
SELECT job_id, COUNT(*)
FROM employees
GROUP BY job_id;

Mark for Review
(1) Points

Displays all the employees and groups them by job.

Displays each job id and the number of people assigned to that job id. (*)

Displays only the number of job_ids.

Displays all the jobs with as many people as there are jobs.

Incorrect Incorrect. Refer to Section 5 Lesson 1.

Section 5

11. Which statement about the GROUP BY clause is true? Mark for Review
(1) Points

To exclude rows before dividing them into groups using the GROUP BY clause, you should use a WHERE clause. (*)

You can use a column alias in a GROUP BY clause.

By default, rows are not sorted when a GROUP BY clause is used.

You must use the HAVING clause with the GROUP BY clause.

Incorrect Incorrect. Refer to Section 5 Lesson 1.

12. The PLAYERS and TEAMS tables contain these columns:

PLAYERS
PLAYER_ID NUMBER NOT NULL, PRIMARY KEY
LAST_NAME VARCHAR2 (30) NOT NULL
FIRST_NAME VARCHAR2 (25) NOT NULL
TEAM_ID NUMBER
POSITION VARCHAR2 (25)

TEAMS
TEAM_ID NUMBER NOT NULL, PRIMARY KEY
TEAM_NAME VARCHAR2 (25)

You need to create a report that lists the names of each team with more than three goal keepers.
Which SELECT statement will produce the desired result?
Mark for Review
(1) Points

SELECT t.team_name, COUNT(p.player_id)
FROM players p, teams t
ON (p.team_id = t.team_id)
WHERE UPPER(p.position) = ‘GOAL KEEPER’
GROUP BY t.team_name;

SELECT t.team_name, COUNT(p.player_id)
FROM players
JOIN teams t ON (p.team_id = t.team_id)
WHERE UPPER(p.position) = ‘GOAL KEEPER’
HAVING COUNT(p.player_id) > 3;

SELECT t.team_name, COUNT(p.player_id)
FROM players p, teams t
ON (p.team_id = t.team_id)
WHERE UPPER(p.position) = ‘GOAL KEEPER’
GROUP BY t.team_name
HAVING COUNT(p.player_id) > 3;

SELECT t.team_name, COUNT(p.player_id)
FROM players p
JOIN teams t ON (p.team_id = t.team_id)
WHERE UPPER(p.position) = ‘GOAL KEEPER’
GROUP BY t.team_name
HAVING COUNT(p.player_id) > 3;

(*)

Incorrect Incorrect. Refer to Section 5 Lesson 1.

13. The PAYMENT table contains these columns:

PAYMENT_ID NUMBER(9) PK
PAYMENT_DATE DATE
CUSTOMER_ID NUMBER(9)

Which SELECT statement could you use to display the number of times each customer payment was made between January 1, 2003 and June 30, 2003 ?
Mark for Review
(1) Points

SELECT customer_id, COUNT(payment_id)
FROM payment
WHERE payment_date BETWEEN ’01-JAN-2003′ AND ’30-JUN-2003′
GROUP BY customer_id;

(*)

SELECT COUNT(payment_id)
FROM payment
WHERE payment_date BETWEEN ’01-JAN-2003′ AND ’30-JUN-2003′;

SELECT customer_id, COUNT(payment_id)
FROM payment
WHERE payment_date BETWEEN ’01-JAN-2003′ AND ’30-JUN-2003′;

SELECT COUNT(payment_id)
FROM payment
WHERE payment_date BETWEEN ’01-JAN-2003′ AND ’30-JUN-2003′
GROUP BY customer_id;

Incorrect Incorrect. Refer to Section 5 Lesson 1.

14. You want to write a report that returns the average salary of all employees in the company, sorted by departments.
The EMPLOYEES table contains the following columns:

EMPLOYEES:
EMP_ID NUMBER(10) PRIMARY KEY
LNAME VARCHAR2(20)
FNAME VARCHAR2(20)
DEPT VARCHAR2(20)
HIRE_DATE DATE
SALARY NUMBER(10)

Which SELECT statement will return the information that you require?
Mark for Review
(1) Points

SELECT salary (AVG)
FROM employees
GROUP BY dept;

SELECT AVG (salary)
FROM employees
GROUP BY dept;

(*)

SELECT AVG (salary)
FROM employees
BY dept;

SELECT AVG salary
FROM employees
BY dept;

Incorrect Incorrect. Refer to Section 5 Lesson 1.

15. Evaluate this SELECT statement:
SELECT MAX(salary), department_id
FROM employees
GROUP BY department_id;

Which values are displayed?
Mark for Review
(1) Points

The highest salary for all employees.

The highest salary in each department. (*)

The employees with the highest salaries.

The employee with the highest salary for each department.

Correct Correct

16. Evaluate this statement:

SELECT department_id, AVG(salary)
FROM employees
WHERE job_id <> 69879
GROUP BY job_id, department_id
HAVING AVG(salary) > 35000
ORDER BY department_id;

Which clauses restricts the result? Choose two.
Mark for Review
(1) Points

(Choose all correct answers)

SELECT department_id, AVG(salary)

WHERE job_id <> 69879 (*)

GROUP BY job_id, department_id

HAVING AVG(salary) > 35000 (*)

Incorrect Incorrect. Refer to Section 5 Lesson 1.

17. The EMPLOYEES table contains these columns:

ID_NUMBER NUMBER Primary Key
NAME VARCHAR2 (30)
DEPARTMENT_ID NUMBER
SALARY NUMBER (7,2)
HIRE_DATE DATE

Evaluate this SQL statement:

SELECT id_number, name, department_id, SUM(salary)
FROM employees
WHERE salary > 25000
GROUP BY department_id, id_number, name
ORDER BY hire_date;

Why will this statement cause an error?
Mark for Review
(1) Points

The HAVING clause is missing.

The WHERE clause contains a syntax error.

The SALARY column is NOT included in the GROUP BY clause.

The HIRE_DATE column is NOT included in the GROUP BY clause. (*)

Incorrect Incorrect. Refer to Section 5 Lesson 1.

18. To control the order of rows returned using SET operators, the ORDER BY clause is used ______ and is placed in the _____ SELECT statement of the query. Mark for Review
(1) Points

ONCE; FIRST

TWICE; FIRST

ONCE; LAST (*)

IN ALL; LAST

Incorrect Incorrect. Refer to Section 5 Lesson 3.

19. When using SET operators the number of columns and the data types of the columns must be identical in all of the SELECT statements used in the query. True or False? Mark for Review
(1) Points

True (*)

False

Correct Correct

Section 6

20. Evaluate this SQL statement:

SELECT employee_id, last_name, salary
FROM employees
WHERE department_id IN
(SELECT department_id
&nbspFROM employees
&nbspWHERE salary > 30000 AND salary < 50000);

Which values will be displayed?
Mark for Review
(1) Points

Only employees who earn more than $30,000.

Only employees who earn less than $50,000.

All employees who work in a department with employees who earn more than $30,000 and more than $50,000.

All employees who work in a department with employees who earn more than $30,000, but less than $50,000. (*)

Incorrect Incorrect. Refer to Section 6 Lesson 3.

Section 6

21. You are looking for Executive information using a subquery.
What will the following SQL statement display?

SELECT department_id, last_name, job_id
FROM employees
WHERE department_id IN
(SELECT department_id FROM departments WHERE department_name = ‘Executive’);
Mark for Review
(1) Points

The department ID, department name and last name for every employee in the Executive department.

The department ID, last name, department name for every Executive in the employees table.

The department ID, last name, job ID from departments for Executive employees.

The department ID, last name, job ID for every employee in the Executive department. (*)

Incorrect Incorrect. Refer to Section 6 Lesson 3.

22. Evaluate this SELECT statement:

SELECT player_id, name
FROM players
WHERE team_id IN
(SELECT team_id
&nbspFROM teams
&nbspWHERE team_id > 300 AND salary_cap > 400000);

What would happen if the inner query returned a NULL value?
Mark for Review
(1) Points

No rows would be returned by the outer query. (*)

A syntax error in the outer query would be returned.

A syntax error in the inner query would be returned.

All the rows in the PLAYER table would be returned by the outer query.

Correct Correct

23. Which statement is false? Mark for Review
(1) Points

The WITH clause retrieves the results of one or more query blocks.

The WITH clause decreases performance. (*)

The WITH clause makes the query simple to read .

Stores the results for the user who runs the query.

Correct Correct

24. A correlated subquery is evaluated _____ for each row processed by the parent statement. Mark for Review
(1) Points

EVERY TIME

ONCE (*)

COMPLETELY

Incorrect Incorrect. Refer to Section 6 Lesson 4.

25. Oracle allows you to write named subqueries in one single statement, as long as you start your statement with the keyword WITH. True or False? Mark for Review
(1) Points

True (*)

False

Correct Correct

26. A correlated subquery will _______ a candidate row from an outer query, _______ the inner query using candidate row value, and _______ values from the inner query to qualify or disqualify the candidate row. Mark for Review
(1) Points

CREATE; EXECUTE; USE

DELETE; UPDATE; INSERT

GET; EXECUTE; USE (*)

ROLLUP; GRANT; DROP

Incorrect Incorrect. Refer to Section 6 Lesson 4.

27. Which best describes a single-row subquery? Mark for Review
(1) Points

A query that returns only one row from the inner SELECT statement (*)

A query that returns one or more rows from the inner SELECT statement

A query that returns only one column value from the inner SELECT statement

A query that returns one or more column values from the inner SELECT statement

Incorrect Incorrect. Refer to Section 6 Lesson 2.

28. If a single-row subquery returns a null value and uses the equality comparison operator, what will the outer query return? Mark for Review
(1) Points

No rows (*)

All the rows in the table

A null value

An error

Incorrect Incorrect. Refer to Section 6 Lesson 2.

29. You need to display all the players whose salaries are greater than or equal to John Brown’s salary. Which comparison operator should you use? Mark for Review
(1) Points

=

>

<=

>= (*)

Correct Correct

30. You need to create a report to display the names of products with a cost value greater than the average cost of all products. Which SELECT statement should you use? Mark for Review
(1) Points

SELECT product_name
FROM products
WHERE cost > (SELECT AVG(cost)
FROM product);

(*)

SELECT product_name
FROM products
WHERE cost > AVG(cost);

SELECT AVG(cost), product_name
FROM products
WHERE cost > AVG(cost)
GROUP by product_name;

SELECT product_name
FROM (SELECT AVG(cost) FROM product)
WHERE cost > AVG(cost);

Incorrect Incorrect. Refer to Section 6 Lesson 1.

Section 6

31. The EMPLOYEES and ORDERS tables contain these columns:

EMPLOYEES
EMPLOYEE_ID NUMBER(10) NOT NULL PRIMARY KEY
FIRST_NAME VARCHAR2(30)
LAST_NAME VARCHAR2(30)
ADDRESS VARCHAR2(25)
CITY VARCHAR2(20)
STATE VARCHAR2(2)
ZIP NUMBER(9)
TELEPHONE NUMBER(10)

ORDERS

ORDER_ID NUMBER(10) NOT NULL PRIMARY KEY
EMPLOYEE_ID NUMBER(10) NOT NULL FOREIGN KEY
ORDER_DATE DATE
TOTAL NUMBER(10)

Which SELECT statement will return all orders generated by a sales representative named Franklin during the year 2001?
Mark for Review
(1) Points

SELECT order_id, total
FROM ORDERS (SELECT employee_id
FROM employees
WHERE last_name = ‘Franklin’)
WHERE order_date BETWEEN ’01-jan-01′ AND ’31-dec-01′;

SELECT (SELECT employee_id FROM employees WHERE last_name = ‘Franklin’) AND order_id, total
FROM ORDERS
WHERE order_date BETWEEN ’01-jan-01′ AND ’31-dec-01′;

SELECT order_id, employee_id, total
FROM ORDERS
WHERE order_date BETWEEN ’01-jan-01′ AND ’31-dec-01′ AND emp_id = ‘Franklin’;

SELECT order_id, total
FROM ORDERS
WHERE employee_id = (SELECT employee_id FROM employees WHERE last_name = ‘Franklin’)
AND order_date BETWEEN ’01-jan-01′ AND ’31-dec-01′;

(*)

Incorrect Incorrect. Refer to Section 6 Lesson 1.

32. Which operator can be used with subqueries that return only one row? Mark for Review
(1) Points

LIKE (*)

ANY

ALL

IN

Incorrect Incorrect. Refer to Section 6 Lesson 1.

33. If you use the equality operator (=) with a subquery, how many values can the subquery return? Mark for Review
(1) Points

Only 1 (*)

Up to 2

Up to 5

Unlimited

Incorrect Incorrect. Refer to Section 6 Lesson 1.

34. Which operator can be used with a multiple-row subquery? Mark for Review
(1) Points

IN (*)

<>

=

LIKE

Incorrect Incorrect. Refer to Section 6 Lesson 1.

35. Which of the following is TRUE regarding the order of subquery execution? Mark for Review
(1) Points

The outer query is executed first

The subquery executes once after the main query

The subquery executes once before the main query (*)

The result of the main query is used with the subquery

Incorrect Incorrect. Refer to Section 6 Lesson 1.

36. Using a subquery in which clause will return a syntax error? Mark for Review
(1) Points

WHERE

FROM

HAVING

You can use subqueries in all of the above clauses. (*)

Incorrect Incorrect. Refer to Section 6 Lesson 1.

Section 7

37. The PRODUCTS table contains these columns:

PRODUCT_ID NUMBER NOT NULL
PRODUCT_NAME VARCHAR2 (25)
SUPPLIER_ID NUMBER NOT NULL
LIST_PRICE NUMBER (7,2)
COST NUMBER (5,2)
QTY_IN_STOCK NUMBER(4)
LAST_ORDER_DT DATE NOT NULL DEFAULT SYSDATE

Which INSERT statement will execute successfully?
Mark for Review
(1) Points

INSERT INTO products
VALUES (2958, ‘Cable’, 8690, 7.09, 4.04, 700);

(*)

INSERT INTO products
VALUES (2958, ‘Cable’, 8690, 7.09, 4.04, SYSDATE);

INSERT INTO products(product_id, product_name)
VALUES (2958, ‘Cable’);

INSERT INTO products(product_id, product_name, supplier_id
VALUES (2958, ‘Cable’, 8690, SYSDATE);

Correct Correct

38. You need to copy rows from the EMPLOYEE table to the EMPLOYEE_HIST table. What could you use in the INSERT statement to accomplish this task? Mark for Review
(1) Points

An ON clause

A SET clause

A subquery (*)

A function

Incorrect Incorrect. Refer to Section 7 Lesson 1.

39. Using the INSERT statement, and assuming that a column can accept null values, how can you implicitly insert a null value in a column? Mark for Review
(1) Points

Use the NULL keyword.

Use the ON clause

Omit the column in the column list. (*)

It is not possible to implicitly insert a null value in a column.

Incorrect Incorrect. Refer to Section 7 Lesson 1.

40. The PRODUCTS table contains these columns:

PROD_ID NUMBER(4)
PROD_NAME VARCHAR2(25)
PROD_PRICE NUMBER(3)

You want to add the following row data to the PRODUCTS table:

(1) a NULL value in the PROD_ID column
(2) “6-foot nylon leash” in the PROD_NAME column
(3) “10″ in the PROD_PRICE column

You issue this statement:

INSERT INTO products
VALUES (null,’6-foot nylon leash’, 10);

What row data did you add to the table?
Mark for Review
(1) Points

The row was created with the correct data in all three columns. (*)

The row was created with the correct data in two of three columns.

The row was created with the correct data in one of the three columns.

The row was created completely wrong. No data ended up in the correct columns.

Correct Correct

Section 7

41. You need to update both the DEPARTMENT_ID and LOCATION_ID columns in the EMPLOYEES table using one UPDATE statement. Which clause should you include in the UPDATE statement to update multiple columns? Mark for Review
(1) Points

The USING clause

The ON clause

The WHERE clause

The SET clause (*)

Incorrect Incorrect. Refer to Section 7 Lesson 2.

42. One of the sales representatives, Janet Roper, has informed you that she was recently married, and she has requested that you update her name in the employee database. Her new last name is Cooper. Janet is the only person with the last name of Roper that is employed by the company. The EMPLOYEES table contains these columns and all data is stored in lowercase:

EMPLOYEE_ID NUMBER(10) PRIMARY KEY
LAST_NAME VARCHAR2(20)
FIRST_NAME VARCHAR2(20)
DEPARTMENT_ID VARCHAR2 (20)
HIRE_DATE DATE
SALARY NUMBER(10)

Which UPDATE statement will accomplish your objective?

Mark for Review
(1) Points

UPDATE employees
SET last_name = ‘cooper’
WHERE last_name = ‘roper’;
(*)

UPDATE employees last_name = ‘cooper’
WHERE last_name = ‘roper’;

UPDATE employees
SET last_name = ‘roper’
WHERE last_name = ‘cooper’;

UPDATE employees
SET cooper = ‘last_name’
WHERE last_name = ‘roper’;

Incorrect Incorrect. Refer to Section 7 Lesson 2.

43. One of your employees was recently married. Her employee ID is still 189, however, her last name is now Rockefeller. Which SQL statement will allow you to reflect this change? Mark for Review
(1) Points

INSERT INTO my_employees SET last_name = ‘Rockefeller’ WHERE employee_ID = 189;

INSERT my_employees SET last_name = ‘Rockefeller’ WHERE employee_ID = 189;

UPDATE INTO my_employees SET last_name = ‘Rockefeller’ WHERE employee_ID = 189;

UPDATE my_employees SET last_name = ‘Rockefeller’ WHERE employee_ID = 189; (*)

Incorrect Incorrect. Refer to Section 7 Lesson 2.

44. You need to update the area code of employees that live in Atlanta. Evaluate this partial UPDATE statement:

UPDATE employee
SET area_code = 770

Which of the following should you include in your UPDATE statement to achieve the desired results?
Mark for Review
(1) Points

UPDATE city = Atlanta;

SET city = ‘Atlanta’;

WHERE city = ‘Atlanta’; (*)

LIKE ‘At%’;

Correct Correct

45. You need to remove a row from the EMPLOYEES table. Which statement would you use? Mark for Review
(1) Points

UPDATE with a WHERE clause

INSERT with a WHERE clause

DELETE with a WHERE clause (*)

MERGE with a WHERE clause

Incorrect Incorrect. Refer to Section 7 Lesson 2.

46. What keyword in an UPDATE statement speficies the columns you want to change? Mark for Review
(1) Points

SELECT

WHERE

SET (*)

HAVING

Incorrect Incorrect. Refer to Section 7 Lesson 2.

47. What would happen if you issued a DELETE statement without a WHERE clause? Mark for Review
(1) Points

All the rows in the table would be deleted. (*)

An error message would be returned.

No rows would be deleted.

Only one row would be deleted.

Incorrect Incorrect. Refer to Section 7 Lesson 2.

48. The TEACHERS and CLASS_ASSIGNMENTS tables contain these columns:

TEACHERS
TEACHER_ID NUMBER(5)
NAME VARCHAR2(25)
SUBJECT_ID NUMBER(5)
HIRE_DATE DATE
SALARY NUMBER(9,2)

CLASS_ASSIGNMENTS
CLASS_ID NUMBER(5)
TEACHER_ID NUMBER(5)
START_DATE DATE
MAX_CAPACITY NUMBER(3)

Which scenario would require a subquery to return the desired results?
Mark for Review
(1) Points

You need to display the start date for each class taught by a given teacher.

You need to create a report to display the teachers who were hired more than five years ago.

You need to display the names of the teachers who teach classes that start within the next week.

You need to create a report to display the teachers who teach more classes than the average number of classes taught by each teacher. (*)

Incorrect Incorrect. Refer to Section 7 Lesson 2.

49. When the WHERE clause is missing in a DELETE statement, what is the result? Mark for Review
(1) Points

All rows are deleted from the table. (*)

The table is removed from the database.

An error message is displayed indicating incorrect syntax.

Nothing. The statement will not execute.

Incorrect Incorrect. Refer to Section 7 Lesson 2.

50. Examine the structures of the PLAYERS, MANAGERS, and TEAMS tables:

PLAYERS
PLAYER_ID NUMBER Primary Key
LAST_NAME VARCHAR2 (30)
FIRST_NAME VARCHAR2 (25)
TEAM_ID NUMBER
MGR_ID NUMBER
SIGNING_BONUS NUMBER(9,2)
SALARY NUMBER(9,2)

MANAGERS
MANAGER_ID NUMBER Primary Key
LAST_NAME VARCHAR2 (20)
FIRST_NAME VARCHAR2 (20)
TEAM_ID NUMBER

TEAMS
TEAM_ID NUMBER Primary Key
TEAM_NAME VARCHAR2 (20)
OWNER_LAST_NAME VARCHAR2 (20)
OWNER_FIRST_NAME VARCHAR2 (20)

Which situation would require a subquery to return the desired result?
Mark for Review
(1) Points

To display the names each player on the Lions team

To display the maximum and minimum player salary for each team

To display the names of the managers for all the teams owned by a given owner (*)

To display each player, their manager, and their team name for all teams with a id value greater than 5000

Incorrect Incorrect. Refer to Section 7 Lesson 2.

  1. est: Mid Term Exam Semester 2 – Part II
  2. Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
  3.         Semester 2 Mid Term Exam Part II covers Sections 5-7 of Database Programming with SQL.
  4.         Section 5
  5.                 1.      You use GROUPING function to:   Mark for Review
  6. (1) Points
  7.         Produce subtotal and cross-tabulated values
  8.         Identify the extra row values created by either a ROLLUP or CUBE operation (*)
  9.         Aggregate rows using SUM, MIN, MAX, and COUNT
  10. Correct         Correct
  11.                 2.      GROUPING SETS is another extension to the GROUP BY clause and is used to specify multiple groupings of data but provide a single result set. True or False?     Mark for Review
  12. (1) Points
  13.         True (*)
  14.         False
  15. Incorrect               Incorrect. Refer to Section 5 Lesson 2.
  16.                 3.      You use GROUPING function to ______ database rows from tabulated rows.  Mark for Review
  17. (1) Points
  18.         CREATE
  19.         DISTINGUISH (*)
  20.         COMPUTE
  21.         COUNT
  22. Incorrect               Incorrect. Refer to Section 5 Lesson 2.
  23.                 4.      CUBE will cross-reference the columns listed in the ______ clause to create a superset of groups.       Mark for Review
  24. (1) Points
  25.         GROUP BY (*)
  26.         WHERE
  27.         SELECT
  28. Correct         Correct
  29.                 5.      Group functions can be nested to a depth of?    Mark for Review
  30. (1) Points
  31.         Three
  32.         Four
  33.         Two (*)
  34.         Group functions cannot be nested.
  35. Correct         Correct
  36.                 6.      The PRODUCTS table contains these columns:
  37. PROD_ID NUMBER(4)
  38. PROD_NAME VARCHAR(20)
  39. PROD_CAT VARCHAR2(15)
  40. PROD_PRICE NUMBER(5)
  41. PROD_QTY NUMBER(4)
  42. You need to identify the minimum product price in each product category.
  43. Which statement could you use to accomplish this task?
  44.         Mark for Review
  45. (1) Points
  46.         SELECT prod_cat, MIN (prod_price)
  47. FROM products
  48. GROUP BY prod_price;
  49.         SELECT prod_cat, MIN (prod_price)
  50. FROM products
  51. GROUP BY prod_cat;
  52. (*)
  53.         SELECT MIN (prod_price), prod_cat
  54. FROM products
  55. GROUP BY MIN (prod_price), prod_cat;
  56.         SELECT prod_price, MIN (prod_cat)
  57. FROM products
  58. GROUP BY prod_cat;
  59. Incorrect               Incorrect. Refer to Section 5 Lesson 1.
  60.                 7.      Evaluate this SELECT statement:
  61. SELECT COUNT(emp_id), mgr_id, dept_id
  62. FROM employees
  63. WHERE status = ‘I’
  64. GROUP BY dept_id
  65. HAVING salary > 30000
  66. ORDER BY 2;
  67. Why does this statement return a syntax error?
  68.         Mark for Review
  69. (1) Points
  70.         MGR_ID must be included in the GROUP BY clause. (*)
  71.         The HAVING clause must specify an aggregate function.
  72.         A single query cannot contain a WHERE clause and a HAVING clause.
  73.         The ORDER BY clause must specify a column name in the EMPLOYEE table.
  74. Incorrect               Incorrect. Refer to Section 5 Lesson 1.
  75.                 8.      Which statement about group functions is true?  Mark for Review
  76. (1) Points
  77.         Group functions ignore null values. (*)
  78.         Group functions can only be used in a SELECT list.
  79.         Group functions can be used in a WHERE clause.
  80.         A query that includes a group function in the SELECT list must include a GROUP BY clause.
  81. Incorrect               Incorrect. Refer to Section 5 Lesson 1.
  82.                 9.      The EMPLOYEES table contains the following columns:
  83. EMPLOYEE_ID NUMBER(10) PRIMARY KEY
  84. LAST_NAME VARCHAR2(20)
  85. FIRST_NAME VARCHAR2(20)
  86. DEPARTMENT VARCHAR2(20)
  87. HIRE_DATE DATE
  88. SALARY NUMBER(10)
  89. You want to create a report that includes each employee’s last name, employee identification number, date of hire and salary. The report should include only those employees who have been with the company for more than one year and whose salary exceeds $40,000.
  90. Which of the following SELECT statements will accomplish this task?
  91.         Mark for Review
  92. (1) Points
  93.         SELECT employee_id, last_name, salary
  94. FROM employees
  95. WHERE salary > 40000
  96. AND hire_date =
  97.    (SELECT hire_date
  98.     FROM employees
  99.     WHERE (sysdate-hire_date) / 365 > 1);
  100.         SELECT employee_id, last_name, hire_date, salary
  101. FROM employees
  102. WHERE salary > 40000 AND hire_date =
  103.     (SELECT hire_date
  104.     FROM employees
  105.     WHERE (sysdate-hire_date) / 365 > 1);
  106.         SELECT employee_id, last_name, hire_date, salary
  107. FROM employees
  108. WHERE salary > 40000
  109. AND (sysdate-hire_date) / 365 > 1;
  110. (*)
  111.         SELECT employee_id, last_name, salary
  112. FROM employees
  113. WHERE salary > 40000
  114. AND hire_date IN (sysdate-hire_date) / 365 > 1);
  115. Incorrect               Incorrect. Refer to Section 5 Lesson 1.
  116.                 10.     What will the following SQL Statement do?
  117. SELECT job_id, COUNT(*)
  118. FROM employees
  119. GROUP BY job_id;
  120.         Mark for Review
  121. (1) Points
  122.         Displays all the employees and groups them by job.
  123.         Displays each job id and the number of people assigned to that job id. (*)
  124.         Displays only the number of job_ids.
  125.         Displays all the jobs with as many people as there are jobs.
  126. Incorrect               Incorrect. Refer to Section 5 Lesson 1.
  127. Section 5
  128.                 11.     Which statement about the GROUP BY clause is true?      Mark for Review
  129. (1) Points
  130.         To exclude rows before dividing them into groups using the GROUP BY clause, you should use a WHERE clause. (*)
  131.         You can use a column alias in a GROUP BY clause.
  132.         By default, rows are not sorted when a GROUP BY clause is used.
  133.         You must use the HAVING clause with the GROUP BY clause.
  134. Incorrect               Incorrect. Refer to Section 5 Lesson 1.
  135.                 12.     The PLAYERS and TEAMS tables contain these columns:
  136. PLAYERS
  137. PLAYER_ID NUMBER NOT NULL, PRIMARY KEY
  138. LAST_NAME VARCHAR2 (30) NOT NULL
  139. FIRST_NAME VARCHAR2 (25) NOT NULL
  140. TEAM_ID NUMBER
  141. POSITION VARCHAR2 (25)
  142. TEAMS
  143. TEAM_ID NUMBER NOT NULL, PRIMARY KEY
  144. TEAM_NAME VARCHAR2 (25)
  145. You need to create a report that lists the names of each team with more than three goal keepers.
  146. Which SELECT statement will produce the desired result?
  147.         Mark for Review
  148. (1) Points
  149.         SELECT t.team_name, COUNT(p.player_id)
  150. FROM players p, teams t
  151. ON (p.team_id = t.team_id)
  152. WHERE UPPER(p.position) = ‘GOAL KEEPER’
  153. GROUP BY t.team_name;
  154.         SELECT t.team_name, COUNT(p.player_id)
  155. FROM players
  156. JOIN teams t ON (p.team_id = t.team_id)
  157. WHERE UPPER(p.position) = ‘GOAL KEEPER’
  158. HAVING COUNT(p.player_id) > 3;
  159.         SELECT t.team_name, COUNT(p.player_id)
  160. FROM players p, teams t
  161. ON (p.team_id = t.team_id)
  162. WHERE UPPER(p.position) = ‘GOAL KEEPER’
  163. GROUP BY t.team_name
  164. HAVING COUNT(p.player_id) > 3;
  165.         SELECT t.team_name, COUNT(p.player_id)
  166. FROM players p
  167. JOIN teams t ON (p.team_id = t.team_id)
  168. WHERE UPPER(p.position) = ‘GOAL KEEPER’
  169. GROUP BY t.team_name
  170. HAVING COUNT(p.player_id) > 3;
  171. (*)
  172. Incorrect               Incorrect. Refer to Section 5 Lesson 1.
  173.                 13.     The PAYMENT table contains these columns:
  174. PAYMENT_ID NUMBER(9) PK
  175. PAYMENT_DATE DATE
  176. CUSTOMER_ID NUMBER(9)
  177. Which SELECT statement could you use to display the number of times each customer payment was made between January 1, 2003 and June 30, 2003 ?
  178.         Mark for Review
  179. (1) Points
  180.         SELECT customer_id, COUNT(payment_id)
  181. FROM payment
  182. WHERE payment_date BETWEEN ’01-JAN-2003′ AND ’30-JUN-2003′
  183. GROUP BY customer_id;
  184. (*)
  185.         SELECT COUNT(payment_id)
  186. FROM payment
  187. WHERE payment_date BETWEEN ’01-JAN-2003′ AND ’30-JUN-2003′;
  188.         SELECT customer_id, COUNT(payment_id)
  189. FROM payment
  190. WHERE payment_date BETWEEN ’01-JAN-2003′ AND ’30-JUN-2003′;
  191.         SELECT COUNT(payment_id)
  192. FROM payment
  193. WHERE payment_date BETWEEN ’01-JAN-2003′ AND ’30-JUN-2003′
  194. GROUP BY customer_id;
  195. Incorrect               Incorrect. Refer to Section 5 Lesson 1.
  196.                 14.     You want to write a report that returns the average salary of all employees in the company, sorted by departments.
  197. The EMPLOYEES table contains the following columns:
  198. EMPLOYEES:
  199. EMP_ID NUMBER(10) PRIMARY KEY
  200. LNAME VARCHAR2(20)
  201. FNAME VARCHAR2(20)
  202. DEPT VARCHAR2(20)
  203. HIRE_DATE DATE
  204. SALARY NUMBER(10)
  205. Which SELECT statement will return the information that you require?
  206.         Mark for Review
  207. (1) Points
  208.         SELECT salary (AVG)
  209. FROM employees
  210. GROUP BY dept;
  211.         SELECT AVG (salary)
  212. FROM employees
  213. GROUP BY dept;
  214. (*)
  215.         SELECT AVG (salary)
  216. FROM employees
  217. BY dept;
  218.         SELECT AVG salary
  219. FROM employees
  220. BY dept;
  221. Incorrect               Incorrect. Refer to Section 5 Lesson 1.
  222.                 15.     Evaluate this SELECT statement:
  223. SELECT MAX(salary), department_id
  224. FROM employees
  225. GROUP BY department_id;
  226. Which values are displayed?
  227.         Mark for Review
  228. (1) Points
  229.         The highest salary for all employees.
  230.         The highest salary in each department. (*)
  231.         The employees with the highest salaries.
  232.         The employee with the highest salary for each department.
  233. Correct         Correct
  234.                 16.     Evaluate this statement:
  235. SELECT department_id, AVG(salary)
  236. FROM employees
  237. WHERE job_id <> 69879
  238. GROUP BY job_id, department_id
  239. HAVING AVG(salary) > 35000
  240. ORDER BY department_id;
  241. Which clauses restricts the result? Choose two.
  242.         Mark for Review
  243. (1) Points
  244.                         (Choose all correct answers)
  245.         SELECT department_id, AVG(salary)
  246.         WHERE job_id <> 69879 (*)
  247.         GROUP BY job_id, department_id
  248.         HAVING AVG(salary) > 35000 (*)
  249. Incorrect               Incorrect. Refer to Section 5 Lesson 1.
  250.                 17.     The EMPLOYEES table contains these columns:
  251. ID_NUMBER NUMBER Primary Key
  252. NAME VARCHAR2 (30)
  253. DEPARTMENT_ID NUMBER
  254. SALARY NUMBER (7,2)
  255. HIRE_DATE DATE
  256. Evaluate this SQL statement:
  257. SELECT id_number, name, department_id, SUM(salary)
  258. FROM employees
  259. WHERE salary > 25000
  260. GROUP BY department_id, id_number, name
  261. ORDER BY hire_date;
  262. Why will this statement cause an error?
  263.         Mark for Review
  264. (1) Points
  265.         The HAVING clause is missing.
  266.         The WHERE clause contains a syntax error.
  267.         The SALARY column is NOT included in the GROUP BY clause.
  268.         The HIRE_DATE column is NOT included in the GROUP BY clause. (*)
  269. Incorrect               Incorrect. Refer to Section 5 Lesson 1.
  270.                 18.     To control the order of rows returned using SET operators, the ORDER BY clause is used ______ and is placed in the _____ SELECT statement of the query. Mark for Review
  271. (1) Points
  272.         ONCE; FIRST
  273.         TWICE; FIRST
  274.         ONCE; LAST (*)
  275.         IN ALL; LAST
  276. Incorrect               Incorrect. Refer to Section 5 Lesson 3.
  277.                 19.     When using SET operators the number of columns and the data types of the columns must be identical in all of the SELECT statements used in the query. True or False?    Mark for Review
  278. (1) Points
  279.         True (*)
  280.         False
  281. Correct         Correct
  282.         Section 6
  283.                 20.     Evaluate this SQL statement:
  284. SELECT employee_id, last_name, salary
  285. FROM employees
  286. WHERE department_id IN
  287.    (SELECT department_id
  288.    &nbspFROM employees
  289.    &nbspWHERE salary > 30000 AND salary < 50000);
  290. Which values will be displayed?
  291.         Mark for Review
  292. (1) Points
  293.         Only employees who earn more than $30,000.
  294.         Only employees who earn less than $50,000.
  295.         All employees who work in a department with employees who earn more than $30,000 and more than $50,000.
  296.         All employees who work in a department with employees who earn more than $30,000, but less than $50,000. (*)
  297. Incorrect               Incorrect. Refer to Section 6 Lesson 3.
  298. Section 6
  299.                 21.     You are looking for Executive information using a subquery.
  300. What will the following SQL statement display?
  301. SELECT department_id, last_name, job_id
  302. FROM employees
  303. WHERE department_id IN
  304.    (SELECT department_id FROM departments WHERE department_name = ‘Executive’);
  305.         Mark for Review
  306. (1) Points
  307.         The department ID, department name and last name for every employee in the Executive department.
  308.         The department ID, last name, department name for every Executive in the employees table.
  309.         The department ID, last name, job ID from departments for Executive employees.
  310.         The department ID, last name, job ID for every employee in the Executive department. (*)
  311. Incorrect               Incorrect. Refer to Section 6 Lesson 3.
  312.                 22.     Evaluate this SELECT statement:
  313. SELECT player_id, name
  314. FROM players
  315. WHERE team_id IN
  316.    (SELECT team_id
  317.    &nbspFROM teams
  318.    &nbspWHERE team_id > 300 AND salary_cap > 400000);
  319. What would happen if the inner query returned a NULL value?
  320.         Mark for Review
  321. (1) Points
  322.         No rows would be returned by the outer query. (*)
  323.         A syntax error in the outer query would be returned.
  324.         A syntax error in the inner query would be returned.
  325.         All the rows in the PLAYER table would be returned by the outer query.
  326. Correct         Correct
  327.                 23.     Which statement is false?       Mark for Review
  328. (1) Points
  329.         The WITH clause retrieves the results of one or more query blocks.
  330.         The WITH clause decreases performance. (*)
  331.         The WITH clause makes the query simple to read .
  332.         Stores the results for the user who runs the query.
  333. Correct         Correct
  334.                 24.     A correlated subquery is evaluated _____ for each row processed by the parent statement.        Mark for Review
  335. (1) Points
  336.         EVERY TIME
  337.         ONCE (*)
  338.         COMPLETELY
  339. Incorrect               Incorrect. Refer to Section 6 Lesson 4.
  340.                 25.     Oracle allows you to write named subqueries in one single statement, as long as you start your statement with the keyword WITH. True or False?  Mark for Review
  341. (1) Points
  342.         True (*)
  343.         False
  344. Correct         Correct
  345.                 26.     A correlated subquery will _______ a candidate row from an outer query, _______ the inner query using candidate row value, and _______ values from the inner query to qualify or disqualify the candidate row.  Mark for Review
  346. (1) Points
  347.         CREATE; EXECUTE; USE
  348.         DELETE; UPDATE; INSERT
  349.         GET; EXECUTE; USE (*)
  350.         ROLLUP; GRANT; DROP
  351. Incorrect               Incorrect. Refer to Section 6 Lesson 4.
  352.                 27.     Which best describes a single-row subquery?     Mark for Review
  353. (1) Points
  354.         A query that returns only one row from the inner SELECT statement (*)
  355.         A query that returns one or more rows from the inner SELECT statement
  356.         A query that returns only one column value from the inner SELECT statement
  357.         A query that returns one or more column values from the inner SELECT statement
  358. Incorrect               Incorrect. Refer to Section 6 Lesson 2.
  359.                 28.     If a single-row subquery returns a null value and uses the equality comparison operator, what will the outer query return?      Mark for Review
  360. (1) Points
  361.         No rows (*)
  362.         All the rows in the table
  363.         A null value
  364.         An error
  365. Incorrect               Incorrect. Refer to Section 6 Lesson 2.
  366.                 29.     You need to display all the players whose salaries are greater than or equal to John Brown’s salary. Which comparison operator should you use?  Mark for Review
  367. (1) Points
  368.         =
  369.         >
  370.         <=
  371.         >= (*)
  372. Correct         Correct
  373.                 30.     You need to create a report to display the names of products with a cost value greater than the average cost of all products. Which SELECT statement should you use?    Mark for Review
  374. (1) Points
  375.         SELECT product_name
  376. FROM products
  377. WHERE cost > (SELECT AVG(cost)
  378. FROM product);
  379. (*)
  380.         SELECT product_name
  381. FROM products
  382. WHERE cost > AVG(cost);
  383.         SELECT AVG(cost), product_name
  384. FROM products
  385. WHERE cost > AVG(cost)
  386. GROUP by product_name;
  387.         SELECT product_name
  388. FROM (SELECT AVG(cost) FROM product)
  389. WHERE cost > AVG(cost);
  390. Incorrect               Incorrect. Refer to Section 6 Lesson 1.
  391. Section 6
  392.                 31.     The EMPLOYEES and ORDERS tables contain these columns:
  393. EMPLOYEES
  394. EMPLOYEE_ID NUMBER(10) NOT NULL PRIMARY KEY
  395. FIRST_NAME VARCHAR2(30)
  396. LAST_NAME VARCHAR2(30)
  397. ADDRESS VARCHAR2(25)
  398. CITY VARCHAR2(20)
  399. STATE VARCHAR2(2)
  400. ZIP NUMBER(9)
  401. TELEPHONE NUMBER(10)
  402. ORDERS
  403. ORDER_ID NUMBER(10) NOT NULL PRIMARY KEY
  404. EMPLOYEE_ID NUMBER(10) NOT NULL FOREIGN KEY
  405. ORDER_DATE DATE
  406. TOTAL NUMBER(10)
  407. Which SELECT statement will return all orders generated by a sales representative named Franklin during the year 2001?
  408.         Mark for Review
  409. (1) Points
  410.         SELECT order_id, total
  411. FROM ORDERS (SELECT employee_id
  412. FROM employees
  413. WHERE last_name = ‘Franklin’)
  414. WHERE order_date BETWEEN ’01-jan-01′ AND ’31-dec-01′;
  415.         SELECT (SELECT employee_id FROM employees WHERE last_name = ‘Franklin’) AND order_id, total
  416. FROM ORDERS
  417. WHERE order_date BETWEEN ’01-jan-01′ AND ’31-dec-01′;
  418.         SELECT order_id, employee_id, total
  419. FROM ORDERS
  420. WHERE order_date BETWEEN ’01-jan-01′ AND ’31-dec-01′ AND emp_id = ‘Franklin’;
  421.         SELECT order_id, total
  422. FROM ORDERS
  423. WHERE employee_id = (SELECT employee_id FROM employees WHERE last_name = ‘Franklin’)
  424. AND order_date BETWEEN ’01-jan-01′ AND ’31-dec-01′;
  425. (*)
  426. Incorrect               Incorrect. Refer to Section 6 Lesson 1.
  427.                 32.     Which operator can be used with subqueries that return only one row?    Mark for Review
  428. (1) Points
  429.         LIKE (*)
  430.         ANY
  431.         ALL
  432.         IN
  433. Incorrect               Incorrect. Refer to Section 6 Lesson 1.
  434.                 33.     If you use the equality operator (=) with a subquery, how many values can the subquery return?  Mark for Review
  435. (1) Points
  436.         Only 1 (*)
  437.         Up to 2
  438.         Up to 5
  439.         Unlimited
  440. Incorrect               Incorrect. Refer to Section 6 Lesson 1.
  441.                 34.     Which operator can be used with a multiple-row subquery?        Mark for Review
  442. (1) Points
  443.         IN (*)
  444.         <>
  445.         =
  446.         LIKE
  447. Incorrect               Incorrect. Refer to Section 6 Lesson 1.
  448.                 35.     Which of the following is TRUE regarding the order of subquery execution?       Mark for Review
  449. (1) Points
  450.         The outer query is executed first
  451.         The subquery executes once after the main query
  452.         The subquery executes once before the main query (*)
  453.         The result of the main query is used with the subquery
  454. Incorrect               Incorrect. Refer to Section 6 Lesson 1.
  455.                 36.     Using a subquery in which clause will return a syntax error?    Mark for Review
  456. (1) Points
  457.         WHERE
  458.         FROM
  459.         HAVING
  460.         You can use subqueries in all of the above clauses. (*)
  461. Incorrect               Incorrect. Refer to Section 6 Lesson 1.
  462.         Section 7
  463.                 37.     The PRODUCTS table contains these columns:
  464. PRODUCT_ID NUMBER NOT NULL
  465. PRODUCT_NAME VARCHAR2 (25)
  466. SUPPLIER_ID NUMBER NOT NULL
  467. LIST_PRICE NUMBER (7,2)
  468. COST NUMBER (5,2)
  469. QTY_IN_STOCK NUMBER(4)
  470. LAST_ORDER_DT DATE NOT NULL DEFAULT SYSDATE
  471. Which INSERT statement will execute successfully?
  472.         Mark for Review
  473. (1) Points
  474.         INSERT INTO products
  475. VALUES (2958, ‘Cable’, 8690, 7.09, 4.04, 700);
  476. (*)
  477.         INSERT INTO products
  478. VALUES (2958, ‘Cable’, 8690, 7.09, 4.04, SYSDATE);
  479.         INSERT INTO products(product_id, product_name)
  480. VALUES (2958, ‘Cable’);
  481.         INSERT INTO products(product_id, product_name, supplier_id
  482. VALUES (2958, ‘Cable’, 8690, SYSDATE);
  483. Correct         Correct
  484.                 38.     You need to copy rows from the EMPLOYEE table to the EMPLOYEE_HIST table. What could you use in the INSERT statement to accomplish this task?   Mark for Review
  485. (1) Points
  486.         An ON clause
  487.         A SET clause
  488.         A subquery (*)
  489.         A function
  490. Incorrect               Incorrect. Refer to Section 7 Lesson 1.
  491.                 39.     Using the INSERT statement, and assuming that a column can accept null values, how can you implicitly insert a null value in a column?  Mark for Review
  492. (1) Points
  493.         Use the NULL keyword.
  494.         Use the ON clause
  495.         Omit the column in the column list. (*)
  496.         It is not possible to implicitly insert a null value in a column.
  497. Incorrect               Incorrect. Refer to Section 7 Lesson 1.
  498.                 40.     The PRODUCTS table contains these columns:
  499. PROD_ID NUMBER(4)
  500. PROD_NAME VARCHAR2(25)
  501. PROD_PRICE NUMBER(3)
  502. You want to add the following row data to the PRODUCTS table:
  503. (1) a NULL value in the PROD_ID column
  504. (2) “6-foot nylon leash” in the PROD_NAME column
  505. (3) “10″ in the PROD_PRICE column
  506. You issue this statement:
  507. INSERT INTO products
  508. VALUES (null,’6-foot nylon leash’, 10);
  509. What row data did you add to the table?
  510.         Mark for Review
  511. (1) Points
  512.         The row was created with the correct data in all three columns. (*)
  513.         The row was created with the correct data in two of three columns.
  514.         The row was created with the correct data in one of the three columns.
  515.         The row was created completely wrong. No data ended up in the correct columns.
  516. Correct         Correct
  517.         Section 7
  518.                 41.     You need to update both the DEPARTMENT_ID and LOCATION_ID columns in the EMPLOYEES table using one UPDATE statement. Which clause should you include in the UPDATE statement to update multiple columns?        Mark for Review
  519. (1) Points
  520.         The USING clause
  521.         The ON clause
  522.         The WHERE clause
  523.         The SET clause (*)
  524. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  525.                 42.     One of the sales representatives, Janet Roper, has informed you that she was recently married, and she has requested that you update her name in the employee database. Her new last name is Cooper. Janet is the only person with the last name of Roper that is employed by the company. The EMPLOYEES table contains these columns and all data is stored in lowercase:
  526. EMPLOYEE_ID NUMBER(10) PRIMARY KEY
  527. LAST_NAME VARCHAR2(20)
  528. FIRST_NAME VARCHAR2(20)
  529. DEPARTMENT_ID VARCHAR2 (20)
  530. HIRE_DATE DATE
  531. SALARY NUMBER(10)
  532. Which UPDATE statement will accomplish your objective?
  533.         Mark for Review
  534. (1) Points
  535.         UPDATE employees
  536. SET last_name = ‘cooper’
  537. WHERE last_name = ‘roper’;
  538. (*)
  539.         UPDATE employees last_name = ‘cooper’
  540. WHERE last_name = ‘roper’;
  541.         UPDATE employees
  542. SET last_name = ‘roper’
  543. WHERE last_name = ‘cooper’;
  544.         UPDATE employees
  545. SET cooper = ‘last_name’
  546. WHERE last_name = ‘roper’;
  547. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  548.                 43.     One of your employees was recently married. Her employee ID is still 189, however, her last name is now Rockefeller. Which SQL statement will allow you to reflect this change?         Mark for Review
  549. (1) Points
  550.         INSERT INTO my_employees SET last_name = ‘Rockefeller’ WHERE employee_ID = 189;
  551.         INSERT my_employees SET last_name = ‘Rockefeller’ WHERE employee_ID = 189;
  552.         UPDATE INTO my_employees SET last_name = ‘Rockefeller’ WHERE employee_ID = 189;
  553.         UPDATE my_employees SET last_name = ‘Rockefeller’ WHERE employee_ID = 189; (*)
  554. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  555.                 44.     You need to update the area code of employees that live in Atlanta. Evaluate this partial UPDATE statement:
  556. UPDATE employee
  557. SET area_code = 770
  558. Which of the following should you include in your UPDATE statement to achieve the desired results?
  559.         Mark for Review
  560. (1) Points
  561.         UPDATE city = Atlanta;
  562.         SET city = ‘Atlanta’;
  563.         WHERE city = ‘Atlanta’; (*)
  564.         LIKE ‘At%’;
  565. Correct         Correct
  566.                 45.     You need to remove a row from the EMPLOYEES table. Which statement would you use?       Mark for Review
  567. (1) Points
  568.         UPDATE with a WHERE clause
  569.         INSERT with a WHERE clause
  570.         DELETE with a WHERE clause (*)
  571.         MERGE with a WHERE clause
  572. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  573.                 46.     What keyword in an UPDATE statement speficies the columns you want to change?   Mark for Review
  574. (1) Points
  575.         SELECT
  576.         WHERE
  577.         SET (*)
  578.         HAVING
  579. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  580.                 47.     What would happen if you issued a DELETE statement without a WHERE clause?      Mark for Review
  581. (1) Points
  582.         All the rows in the table would be deleted. (*)
  583.         An error message would be returned.
  584.         No rows would be deleted.
  585.         Only one row would be deleted.
  586. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  587.                 48.     The TEACHERS and CLASS_ASSIGNMENTS tables contain these columns:
  588. TEACHERS
  589. TEACHER_ID NUMBER(5)
  590. NAME VARCHAR2(25)
  591. SUBJECT_ID NUMBER(5)
  592. HIRE_DATE DATE
  593. SALARY NUMBER(9,2)
  594. CLASS_ASSIGNMENTS
  595. CLASS_ID NUMBER(5)
  596. TEACHER_ID NUMBER(5)
  597. START_DATE DATE
  598. MAX_CAPACITY NUMBER(3)
  599. Which scenario would require a subquery to return the desired results?
  600.         Mark for Review
  601. (1) Points
  602.         You need to display the start date for each class taught by a given teacher.
  603.         You need to create a report to display the teachers who were hired more than five years ago.
  604.         You need to display the names of the teachers who teach classes that start within the next week.
  605.         You need to create a report to display the teachers who teach more classes than the average number of classes taught by each teacher. (*)
  606. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  607.                 49.     When the WHERE clause is missing in a DELETE statement, what is the result?     Mark for Review
  608. (1) Points
  609.         All rows are deleted from the table. (*)
  610.         The table is removed from the database.
  611.         An error message is displayed indicating incorrect syntax.
  612.         Nothing. The statement will not execute.
  613. Incorrect               Incorrect. Refer to Section 7 Lesson 2.
  614.                 50.     Examine the structures of the PLAYERS, MANAGERS, and TEAMS tables:
  615. PLAYERS
  616. PLAYER_ID NUMBER Primary Key
  617. LAST_NAME VARCHAR2 (30)
  618. FIRST_NAME VARCHAR2 (25)
  619. TEAM_ID NUMBER
  620. MGR_ID NUMBER
  621. SIGNING_BONUS NUMBER(9,2)
  622. SALARY NUMBER(9,2)
  623. MANAGERS
  624. MANAGER_ID NUMBER Primary Key
  625. LAST_NAME VARCHAR2 (20)
  626. FIRST_NAME VARCHAR2 (20)
  627. TEAM_ID NUMBER
  628. TEAMS
  629. TEAM_ID NUMBER Primary Key
  630. TEAM_NAME VARCHAR2 (20)
  631. OWNER_LAST_NAME VARCHAR2 (20)
  632. OWNER_FIRST_NAME VARCHAR2 (20)
  633. Which situation would require a subquery to return the desired result?
  634.         Mark for Review
  635. (1) Points
  636.         To display the names each player on the Lions team
  637.         To display the maximum and minimum player salary for each team
  638.         To display the names of the managers for all the teams owned by a given owner (*)
  639.         To display each player, their manager, and their team name for all teams with a id value greater than 5000
  640. Incorrect               Incorrect. Refer to Section 7 Lesson 2.

1. Which comparison operator can only be used with a single-row subquery? Mark for Review
(1) Points

ANY

ALL

(*)

IN

Correct Correct

2. Which best describes a single-row subquery? Mark for Review
(1) Points

A query that returns only one row from the inner SELECT statement (*)

A query that returns one or more rows from the inner SELECT statement

A query that returns only one column value from the inner SELECT statement

A query that returns one or more column values from the inner SELECT statement

Correct Correct

3. Which statement is false? Mark for Review
(1) Points

The WITH clause retrieves the results of one or more query blocks

The WITH clause decreases performance (*)

The WITH clause makes the query simple to read

The WITH clause stores the results for the user who runs the query

Correct Correct

4. Which answer is incorrect? The parent statement can be: Mark for Review
(1) Points

A SELECT statement

An INSERT statement (*)

An UPDATE statement

A DELETE statement

Correct Correct

5. A correlated subquery is evaluated _____ for each row processed by the parent statement. Mark for Review
(1) Points

EVERY TIME

ONCE (*)

COMPLETELY

Correct Correct

6. The WITH clause enables a SELECT statement to define the subquery block at the start of the query, process the block just once, label the results, and then refer to the results multiple times. True or False? Mark for Review
(1) Points

True (*)

False

Correct Correct

7. You need to display all the players whose salaries are greater than or equal to John Brown’s salary. Which comparison operator should you use? Mark for Review
(1) Points

=

>

= (*)

Correct Correct

8. Using a subquery in which clause will return a syntax error? Mark for Review
(1) Points

WHERE

FROM

HAVING

You can use subqueries in all of the above clauses. (*)

Correct Correct

9. You need to create a report to display the names of products with a cost value greater than the average cost of all products. Which SELECT statement should you use? Mark for Review
(1) Points

SELECT product_name
FROM products
WHERE cost > (SELECT AVG(cost)
FROM product);

(*)

SELECT product_name
FROM products
WHERE cost > AVG(cost);

SELECT AVG(cost), product_name
FROM products
WHERE cost > AVG(cost)
GROUP by product_name;

SELECT product_name
FROM (SELECT AVG(cost) FROM product)
WHERE cost > AVG(cost);

Correct Correct

10. Which of the following is TRUE regarding the order of subquery execution? Mark for Review
(1) Points

The outer query is executed first

The subquery executes once after the main query

The subquery executes once before the main query (*)

The result of the main query is used with the subquery

Correct Correct

Examine the structures of the CUSTOMER and ORDER_HISTORY tables:

CUSTOMER
CUSTOMER_ID NUMBER(5)
NAME VARCHAR2(25)
CREDIT_LIMIT NUMBER(8,2)
OPEN_DATE DATE
ORDER_HISTORY

ORDER_ID NUMBER(5)
CUSTOMER_ID NUMBER(5)
ORDER_DATE DATE
TOTAL NUMBER(8,2)

Which of the following scenarios would require a subquery to return the desired results?
Mark for Review
(1) Points

You need to display the date each customer account was opened.

You need to display each date that a customer placed an order.

You need to display all the orders that were placed on a certain date.

You need to display all the orders that were placed on the same day as order number 25950. (*)

Correct Correct

12. Which statement about subqueries is true? Mark for Review
(1) Points

Subqueries should be enclosed in double quotation marks.

Subqueries cannot contain group functions.

Subqueries are often used in a WHERE clause to return values for an unknown conditional value. (*)

Subqueries generally execute last, after the main or outer query executes.

Correct Correct

13. Which operator can be used with a multiple-row subquery? Mark for Review
(1) Points

IN (*)

=

LIKE

Correct Correct

14. The EMPLOYEES and ORDERS tables contain these columns:

EMPLOYEES
EMPLOYEE_ID NUMBER(10) NOT NULL PRIMARY KEY
FIRST_NAME VARCHAR2(30)
LAST_NAME VARCHAR2(30)
ADDRESS VARCHAR2(25)
CITY VARCHAR2(20)
STATE VARCHAR2(2)
ZIP NUMBER(9)
TELEPHONE NUMBER(10)

ORDERS

ORDER_ID NUMBER(10) NOT NULL PRIMARY KEY
EMPLOYEE_ID NUMBER(10) NOT NULL FOREIGN KEY
ORDER_DATE DATE
TOTAL NUMBER(10)

Which SELECT statement will return all orders generated by a sales representative named Franklin during the year 2001?
Mark for Review
(1) Points

SELECT order_id, total
FROM ORDERS (SELECT employee_id
FROM employees
WHERE last_name = ‘Franklin’)
WHERE order_date BETWEEN ‘01-jan-01′ AND ‘31-dec-01′;

SELECT (SELECT employee_id FROM employees WHERE last_name = ‘Franklin’) AND order_id, total
FROM ORDERS
WHERE order_date BETWEEN ‘01-jan-01′ AND ‘31-dec-01′;

SELECT order_id, employee_id, total
FROM ORDERS
WHERE order_date BETWEEN ‘01-jan-01′ AND ‘31-dec-01′ AND emp_id = ‘Franklin’;

SELECT order_id, total
FROM ORDERS
WHERE employee_id = (SELECT employee_id FROM employees WHERE last_name = ‘Franklin’)
AND order_date BETWEEN ‘01-jan-01′ AND ‘31-dec-01′;

(*)

Correct Correct

15. Examine the structures of the PARTS and MANUFACTURERS tables:

PARTS:
PARTS_ID VARCHAR2(25) PK
PARTS_NAME VARCHAR2(50)
MANUFACTURERS_ID NUMBER
COST NUMBER(5,2)
PRICE NUMBER(5,2)

MANUFACTURERS:
ID NUMBER PK
NAME VARCHAR2(30)
LOCATION VARCHAR2(20)

Which SQL statement correctly uses a subquery?
Mark for Review
(1) Points

UPDATE parts SET price = price * 1.15
WHERE manufacturers_id =
(SELECT id
FROM manufacturers
WHERE UPPER(location) IN(’ ATLANTA ‘, ム BOSTON ‘, ム DALLAS ‘));

SELECT parts_name, price, cost
FROM parts
WHERE manufacturers_id !=
(SELECT id
FROM manufacturers
WHERE LOWER(name) = ‘cost plus’);

SELECT parts_name, price, cost
FROM parts
WHERE manufacturers_id IN
(SELECT id
FROM manufacturers m
JOIN part p
ON (m.id = p.manufacturers_id));

(*)

SELECT parts_name
FROM (SELECT AVG(cost) FROM manufacturers)
WHERE cost > AVG(cost);

Correct Correct

16. What is wrong with the following query?
SELECT employee_id, last_name
FROM employees
WHERE salary =
(SELECT MIN(salary) FROM employees GROUP BY department_id); Mark for Review
(1) Points

Single rows contain multiple values and a logical operator is used.

Subquery returns more than one row and single row comparison operator is used. (*)

Subquery references the wrong table in the WHERE clause.

Nothing, it will run without problems.

Correct Correct

17. Evaluate this SQL statement:

SELECT employee_id, last_name, salary
FROM employees
WHERE department_id IN
(SELECT department_id
FROM employees
WHERE salary > 30000 AND salary 10000 (*)

WHERE hire_date > AVG(hire_date)

Correct Correct

39. Evaluate this SELECT statement:

SELECT SUM(salary), department_id, manager_id
FROM employees
GROUP BY department_id, manager_id;

Which SELECT clause allows you to restrict the rows returned, based on a group function?
Mark for Review
(1) Points

HAVING SUM(salary) > 100000 (*)

WHERE SUM(salary) > 100000

WHERE salary > 100000

HAVING salary > 100000

Correct Correct

40. The MANUFACTURER table contains these columns:

MANUFACTURER_ID NUMBER
MANUFACTURER_NAME VARCHAR2(30)
TYPE VARCHAR2(25)
LOCATION_ID NUMBER

You need to display the number of unique types of manufacturers at each location. Which SELECT statement should you use?
Mark for Review
(1) Points

SELECT location_id, COUNT(DISTINCT type)
FROM manufacturer
GROUP BY location_id;

(*)

SELECT location_id, COUNT(DISTINCT type)
FROM manufacturer;

SELECT location_id, COUNT(type)
FROM manufacturer
GROUP BY location_id;

SELECT location_id, COUNT(DISTINCT type)
FROM manufacturer
GROUP BY type;

41. The PRODUCTS table contains these columns:

PROD_ID NUMBER(4)
PROD_NAME VARCHAR(20)
PROD_CAT VARCHAR2(15)
PROD_PRICE NUMBER(5)
PROD_QTY NUMBER(4)

You need to identify the minimum product price in each product category.
Which statement could you use to accomplish this task?
Mark for Review
(1) Points

SELECT prod_cat, MIN (prod_price)
FROM products
GROUP BY prod_price;

SELECT prod_cat, MIN (prod_price)
FROM products
GROUP BY prod_cat;

(*)

SELECT MIN (prod_price), prod_cat
FROM products
GROUP BY MIN (prod_price), prod_cat;

SELECT prod_price, MIN (prod_cat)
FROM products
GROUP BY prod_cat;

Incorrect Incorrect. Refer to Section 5 Lesson 1.

42. What is the best explanation as to why this SQL statement will NOT execute?

SELECT department_id “Department”, AVG (salary)”Average”
FROM employees
GROUP BY Department;
Mark for Review
(1) Points

Salaries cannot be averaged as not all the numbers will divide evenly.

You cannot use a column alias in the GROUP BY clause. (*)

The GROUP BY clause must have something to GROUP.

The department id is not listed in the departments table.

Correct Correct

43. Which statement about group functions is true? Mark for Review
(1) Points

Group functions ignore null values. (*)

Group functions can only be used in a SELECT list.

Group functions can be used in a WHERE clause.

A query that includes a group function in the SELECT list must include a GROUP BY clause.

Correct Correct

44. Evaluate this SELECT statement:

SELECT SUM(salary), department_id, department_name
FROM employees
WHERE department_id = 1
GROUP BY department;

Which clause of the SELECT statement contains a syntax error?
Mark for Review
(1) Points

SELECT

FROM

WHERE

GROUP BY (*)

Correct Correct

45. Evaluate this SELECT statement:

SELECT COUNT(emp_id), mgr_id, dept_id
FROM employees
WHERE status = ‘I’
GROUP BY dept_id
HAVING salary > 30000
ORDER BY 2;

Why does this statement return a syntax error?
Mark for Review
(1) Points

MGR_ID must be included in the GROUP BY clause. (*)

The HAVING clause must specify an aggregate function.

A single query cannot contain a WHERE clause and a HAVING clause.

The ORDER BY clause must specify a column name in the EMPLOYEE table.

Correct Correct

46. The EMPLOYEES table contains these columns:

ID_NUMBER NUMBER Primary Key
NAME VARCHAR2 (30)
DEPARTMENT_ID NUMBER
SALARY NUMBER (7,2)
HIRE_DATE DATE

Evaluate this SQL statement:

SELECT id_number, name, department_id, SUM(salary)
FROM employees
WHERE salary > 25000
GROUP BY department_id, id_number, name
ORDER BY hire_date;

Why will this statement cause an error?
Mark for Review
(1) Points

The HAVING clause is missing.

The WHERE clause contains a syntax error.

The SALARY column is NOT included in the GROUP BY clause.

The HIRE_DATE column is NOT included in the GROUP BY clause. (*)

Correct Correct

47. You want to write a report that returns the average salary of all employees in the company, sorted by departments.
The EMPLOYEES table contains the following columns:

EMPLOYEES:
EMP_ID NUMBER(10) PRIMARY KEY
LNAME VARCHAR2(20)
FNAME VARCHAR2(20)
DEPT VARCHAR2(20)
HIRE_DATE DATE
SALARY NUMBER(10)

Which SELECT statement will return the information that you require?
Mark for Review
(1) Points

SELECT salary (AVG)
FROM employees
GROUP BY dept;

SELECT AVG (salary)
FROM employees
GROUP BY dept;

(*)

SELECT AVG (salary)
FROM employees
BY dept;

SELECT AVG salary
FROM employees
BY dept;

Correct Correct

48. Evaluate this SELECT statement:

SELECT COUNT(employee_id), department_id
FROM employees
GROUP BY department_id;

You only want to include employees who earn more than 15000.
Which clause should you include in the SELECT statement?
Mark for Review
(1) Points

WHERE salary > 15000 (*)

HAVING salary > 15000

WHERE SUM(salary) > 15000

HAVING SUM(salary) > 15000

Correct Correct

49. When using SET operators the names of the columns must be identified in all of the SELECT statements used in the query. True or False? Mark for Review
(1) Points

True

False (*)

Correct Correct

50. The ___________ operator returns all rows from both tables, after eliminating duplicates. Mark for Review
(1) Points

UNION (*)

UNION ALL

INTERSECT

MINUS

Correct Correct

Test: Mid Term Exam Semester 2 - Part II
1.  	The PRODUCTS table contains these columns:
PRODUCT_ID NUMBER NOT NULL 
PRODUCT_NAME VARCHAR2 (25)
SUPPLIER_ID NUMBER NOT NULL
LIST_PRICE NUMBER (7,2)
COST NUMBER (5,2)
QTY_IN_STOCK NUMBER(4)
LAST_ORDER_DT DATE NOT NULL DEFAULT SYSDATE
Which INSERT statement will execute successfully?	

INSERT INTO products 
VALUES (2958, 'Cable', 8690, 7.09, 4.04, 700);
(*)

INSERT INTO products 
VALUES (2958, 'Cable', 8690, 7.09, 4.04, SYSDATE);

INSERT INTO products(product_id, product_name) 
VALUES (2958, 'Cable');

INSERT INTO products(product_id, product_name, supplier_id 
VALUES (2958, 'Cable', 8690, SYSDATE);

 	 	 	 	 	 	Correct

 	 	2.  	You have been instructed to add a new customer to the CUSTOMERS table. Because the new customer has not had a credit check, you should not add an amount to the CREDIT column. 
The CUSTOMERS table contains these columns:
CUST_ID NUMBER(10) 
COMPANY VARCHAR2(30) 
CREDIT NUMBER(10) 
POC VARCHAR2(30) 
LOCATION VARCHAR2(30)
Which two INSERT statements will accomplish your objective?	 Označit pro zhodnocení 
(1) Body 

 	 	 	(Vyberte všechny správné odpovědi)	 

INSERT INTO customers (cust_id, company, poc, location) 
VALUES (200, 'InterCargo', 'tflanders', 'samerica');
(*)

INSERT INTO customers 
VALUES (200, 'InterCargo', null, 'tflanders', 'samerica');
(*)

INSERT INTO customers 
VALUES (cust_id, company, credit, poc, location) (200, 'InterCargo', 0, 'tflanders', 'samerica');

INSERT INTO customers 
VALUES (200, InterCargo, 0, tflanders, samerica);

 	 	 	 	 	 	Correct

 	 	3.  	Assume all the column names are correct. The following SQL statement will execute which of the following?
INSERT INTO departments (department_id, department_name, manager_id, location_id) 
VALUES (70, 'Public Relations', 100, 1700);	 Označit pro zhodnocení 
(1) Body 

100 will be inserted into the department_id column

1700 will be inserted into the manager_id column

70 will be inserted into the department_id column (*)

ムPublic Relationsメ will be inserted into the manager_name column

 	 	 	 	 	 	Correct

 	 	4.  	The STUDENTS table contains these columns:
STU_ID NUMBER(9) NOT NULL 
LAST_NAME VARCHAR2 (30) NOT NULL 
FIRST_NAME VARCHAR2 (25) NOT NULL 
DOB DATE 
STU_TYPE_ID VARCHAR2(1) NOT NULL 
ENROLL_DATE DATE
You create another table, named FT_STUDENTS, with an identical structure.You want to insert all full-time students, who have a STU_TYPE_ID value of "F", into the new table. You execute this INSERT statement:
INSERT INTO ft_students 
   (SELECT stu_id, last_name, first_name, dob, stu_type_id, enroll_date 
FROM students 
WHERE UPPER(stu_type_id) = 'F');
What is the result of executing this INSERT statement?	 Označit pro zhodnocení 
(1) Body 

All full-time students are inserted into the FT_STUDENTS table. (*)

An error occurs because the FT_STUDENTS table already exists.

An error occurs because you CANNOT use a subquery in an INSERT statement.

An error occurs because the INSERT statement does NOT contain a VALUES clause.

 	 	 	 	 	 	Correct

 	 	5.  	One of the sales representatives, Janet Roper, has informed you that she was recently married, and she has requested that you update her name in the employee database. Her new last name is Cooper. Janet is the only person with the last name of Roper that is employed by the company. The EMPLOYEES table contains these columns and all data is stored in lowercase:
EMPLOYEE_ID NUMBER(10) PRIMARY KEY 
LAST_NAME VARCHAR2(20)
FIRST_NAME VARCHAR2(20)
DEPARTMENT_ID VARCHAR2 (20)
HIRE_DATE DATE
SALARY NUMBER(10)
Which UPDATE statement will accomplish your objective?	 Označit pro zhodnocení 
(1) Body 

UPDATE employees 
SET last_name = 'cooper' 
WHERE last_name = 'roper'; (*)

UPDATE employees last_name = 'cooper' 
WHERE last_name = 'roper';

UPDATE employees 
SET last_name = 'roper' 
WHERE last_name = 'cooper';

UPDATE employees 
SET cooper = 'last_name' 
WHERE last_name = 'roper';

 	 	 	 	 	 	Correct

 	 	6.  	Examine the structures of the PRODUCTS and SUPPLIERS tables:
SUPPLIERS 
SUPPLIER_ID NUMBER NOT NULL, Primary Key 
SUPPLIER_NAME VARCHAR2 (25) 
ADDRESS VARCHAR2 (30) 
CITY VARCHAR2 (25) 
REGION VARCHAR2 (10) 
POSTAL_CODE VARCHAR2 (11)
PRODUCTS 
PRODUCT_ID NUMBER NOT NULL, Primary Key 
PRODUCT_NAME VARCHAR2 (25) 
SUPPLIER_ID NUMBER Foreign key to SUPPLIER_ID of the SUPPLIERS table 
CATEGORY_ID NUMBER 
QTY_PER_UNIT NUMBER 
UNIT_PRICE NUMBER (7,2) 
QTY_IN_STOCK NUMBER 
QTY_ON_ORDER NUMBER 
REORDER_LEVEL NUMBER
You want to delete any products supplied by the five suppliers located in Atlanta. Which script should you use?	 Označit pro zhodnocení 
(1) Body 

DELETE FROM products 
WHERE supplier_id IN 
(SELECT supplier_id FROM suppliers WHERE UPPER(city) = 'ATLANTA');
(*)

DELETE FROM products 
WHERE UPPER(city) = 'ATLANTA';

DELETE FROM products 
WHERE supplier_id = 
(SELECT supplier_id FROM suppliers WHERE UPPER(city) = 'ATLANTA');

DELETE FROM suppliers 
WHERE supplier_id IN 
(SELECT supplier_id FROM suppliers WHERE UPPER(city) = 'ALANTA');

 	 	 	 	 	 	Correct

 	 	7.  	Which of the following represents the correct syntax for an INSERT statement?	 Označit pro zhodnocení 
(1) Body 

INSERT VALUES INTO customers (3178 J. Smith 123 Main Street Nashville TN 37777;

INSERT INTO customers VALUES '3178' 'J.' 'Smith' '123 Main Street' 'Nashville' 'TN' '37777';

INSERT INTO customers VALUES ('3178', 'J.', 'Smith', '123 Main Street', 'Nashville', 'TN', '37777'); (*)

INSERT customers VALUES 3178, J., Smith, 123 Main Street, Nashville, TN, 37777;

 	 	 	 	 	 	Correct

 	 	8.  	Which two commands can be used to modify existing data in a database row?	 Označit pro zhodnocení 
(1) Body 

 	 	 	(Vyberte všechny správné odpovědi)	 

DELETE

MERGE (*)

SELECT

UPDATE (*)

 	 	 	 	 	 	Correct

 	 	9.  	One of your employees was recently married. Her employee ID is still 189, however, her last name is now Rockefeller. Which SQL statement will allow you to reflect this change?	 Označit pro zhodnocení 
(1) Body 

INSERT INTO my_employees SET last_name = 'Rockefeller' WHERE employee_ID = 189;

INSERT my_employees SET last_name = 'Rockefeller' WHERE employee_ID = 189;

UPDATE INTO my_employees SET last_name = 'Rockefeller' WHERE employee_ID = 189;

UPDATE my_employees SET last_name = 'Rockefeller' WHERE employee_ID = 189; (*)

 	 	 	 	 	 	Correct

 	 	10.  	When the WHERE clause is missing in a DELETE statement, what is the result?	 Označit pro zhodnocení 
(1) Body 

All rows are deleted from the table. (*)

The table is removed from the database.

An error message is displayed indicating incorrect syntax.

Nothing. The statement will not execute.

 	 	 	 	 	 	Correct

Test: Mid Term Exam Semester 2 - Part II

Projděte své odpovědi, odezvy a hodnocení otázek dole. Hvězdička (*) značí správnou odpověď.

 	Semester 2 Mid Term Exam Part II covers Sections 5-7 of Database Programming with SQL also.	 

 	Section 7
 	(Odpovězte na všechny otázky v této části)

 	 	11.  	What keyword in an UPDATE statement speficies the columns you want to change?	 Označit pro zhodnocení 
(1) Body 

SELECT

WHERE

SET (*)

HAVING

 	 	 	 	 	 	Correct

 	 	12.  	You need to update the expiration date of products manufactured before June 30th . In which clause of the UPDATE statement will you specify this condition?	 Označit pro zhodnocení 
(1) Body 

The ON clause

The WHERE clause (*)

The SET clause

The USING clause

 	 	 	 	 	 	Correct

 	 	13.  	Aliases can be used with MERGE statements. True or False?	 Označit pro zhodnocení 
(1) Body 

True (*)

False

 	 	 	 	 	 	Correct

 	 	14.  	Multi-table inserts are used when the same source data should be inserted into _____________ target table.	 Označit pro zhodnocení 
(1) Body 

Ten

A very large

More than one (*)

A data warehouse

 	 	 	 	 	 	Correct

 	Section 6
 	(Odpovězte na všechny otázky v této části)

 	 	15.  	The Oracle server performs a correlated subquery when the subquery references a column from a table referred to in the parent. True or False?	 Označit pro zhodnocení 
(1) Body 

True (*)

False

 	 	 	 	 	 	Correct

 	 	16.  	A correlated subquery will _______ a candidate row from an outer query, _______ the inner query using candidate row value, and _______ values from the inner query to qualify or disqualify the candidate row.	 Označit pro zhodnocení 
(1) Body 

CREATE; EXECUTE; USE

DELETE; UPDATE; INSERT

GET; EXECUTE; USE (*)

ROLLUP; GRANT; DROP

 	 	 	 	 	 	Incorrect. Refer to Section 6 Lesson 4.

 	 	17.  	The WITH clause enables a SELECT statement to define the subquery block at the start of the query, process the block just once, label the results, and then refer to the results multiple times. True or False?	 Označit pro zhodnocení 
(1) Body 

True (*)

False

 	 	 	 	 	 	Correct

 	 	18.  	Which statement is false?	 Označit pro zhodnocení 
(1) Body 

The WITH clause retrieves the results of one or more query blocks

The WITH clause decreases performance (*)

The WITH clause makes the query simple to read

The WITH clause stores the results for the user who runs the query

 	 	 	 	 	 	Correct

 	 	19.  	Examine the data in the PAYMENT table:
>>>>
PAYMENT_ID	CUSTOMER_ID	PAYMENT_DATE	PAYMENT_TYPE	PAYMENT_AMOUNT
86590586	8908090	10-JUN-03	BASIC	859.00
89453485	8549038	15-FEB-03	INTEREST	596.00
85490345	5489304	20-MAR-03	BASIC	568.00
This statement fails when executed:
SELECT payment_date, customer_id, payment_amount 
FROM payment 
WHERE payment_id = 
   (SELECT payment_id 
    FROM payment 
    WHERE payment_date >= '05-JAN-2002' OR payment_amount > 500.00);
Which change could correct the problem?	 Označit pro zhodnocení 
(1) Body 

Remove the subquery WHERE clause.

Change the outer query WHERE clause to 'WHERE payment_id IN'. (*)

Include the PAYMENT_ID column in the select list of the outer query.

Remove the single quotes around the date value in the inner query WHERE clause.

 	 	 	 	 	 	Correct

 	 	20.  	Evaluate this SELECT statement:
SELECT player_id, name 
FROM players 
WHERE team_id IN 
   (SELECT team_id 
    FROM teams 
    WHERE team_id > 300 AND salary_cap > 400000);
What would happen if the inner query returned a NULL value?	 Označit pro zhodnocení 
(1) Body 

No rows would be returned by the outer query. (*)

A syntax error in the outer query would be returned.

A syntax error in the inner query would be returned.

All the rows in the PLAYER table would be returned by the outer query.

 	 	 	 	 	 	Correct

 	Stránka 2 z 5	 	 

Test: Mid Term Exam Semester 2 - Part II

Projděte své odpovědi, odezvy a hodnocení otázek dole. Hvězdička (*) značí správnou odpověď.

 	Semester 2 Mid Term Exam Part II covers Sections 5-7 of Database Programming with SQL also.	 

 	Section 6
 	(Odpovězte na všechny otázky v této části)

 	 	21.  	Which statement about the ANY operator when used with a multiple-row subquery is true?	 Označit pro zhodnocení 
(1) Body 

The ANY operator compares every value returned by the subquery. (*)

The ANY operator can be used with the DISTINCT keyword.

The ANY operator is a synonym for the ALL operator.

The ANY operator can be used with the LIKE and IN operators.

 	 	 	 	 	 	Correct

 	 	22.  	If a single-row subquery returns a null value and uses the equality comparison operator, what will the outer query return?	 Označit pro zhodnocení 
(1) Body 

No rows (*)

All the rows in the table

A null value

An error

 	 	 	 	 	 	Correct

 	 	23.  	Which statement about the <> operator is true?	 Označit pro zhodnocení 
(1) Body 

The <> operator is NOT a valid SQL operator.

The <> operator CANNOT be used in a single-row subquery.

The <> operator returns the same result as the ANY operator in a subquery.

The <> operator can be used when a single-row subquery returns only one row. (*)

 	 	 	 	 	 	Correct

 	 	24.  	Which statement about subqueries is true?	 Označit pro zhodnocení 
(1) Body 

Subqueries should be enclosed in double quotation marks.

Subqueries cannot contain group functions.

Subqueries are often used in a WHERE clause to return values for an unknown conditional value. (*)

Subqueries generally execute last, after the main or outer query executes.

 	 	 	 	 	 	Correct

 	 	25.  	The EMPLOYEES and ORDERS tables contain these columns:
EMPLOYEES 
EMPLOYEE_ID NUMBER(10) NOT NULL PRIMARY KEY 
FIRST_NAME VARCHAR2(30) 
LAST_NAME VARCHAR2(30) 
ADDRESS VARCHAR2(25) 
CITY VARCHAR2(20) 
STATE VARCHAR2(2) 
ZIP NUMBER(9) 
TELEPHONE NUMBER(10)
ORDERS
ORDER_ID NUMBER(10) NOT NULL PRIMARY KEY 
EMPLOYEE_ID NUMBER(10) NOT NULL FOREIGN KEY 
ORDER_DATE DATE
TOTAL NUMBER(10)
Which SELECT statement will return all orders generated by a sales representative named Franklin during the year 2001?	 Označit pro zhodnocení 
(1) Body 

SELECT order_id, total 
FROM ORDERS (SELECT employee_id 
FROM employees 
WHERE last_name = 'Franklin') 
WHERE order_date BETWEEN '01-jan-01' AND '31-dec-01';

SELECT (SELECT employee_id FROM employees WHERE last_name = 'Franklin') AND order_id, total 
FROM ORDERS 
WHERE order_date BETWEEN '01-jan-01' AND '31-dec-01';

SELECT order_id, employee_id, total 
FROM ORDERS 
WHERE order_date BETWEEN '01-jan-01' AND '31-dec-01' AND emp_id = 'Franklin';

SELECT order_id, total 
FROM ORDERS 
WHERE employee_id = (SELECT employee_id FROM employees WHERE last_name = 'Franklin') 
AND order_date BETWEEN '01-jan-01' AND '31-dec-01';
(*)

 	 	 	 	 	 	Correct

 	 	26.  	The TEACHERS and CLASS_ASSIGNMENTS tables contain these columns:
TEACHERS 
TEACHER_ID NUMBER(5) Primary Key 
NAME VARCHAR2 (25) 
SUBJECT_ID NUMBER(5)
CLASS_ASSIGNMENTS 
CLASS_ID NUMBER (5) Primary Key 
TEACHER_ID NUMBER (5) 
DATE 
MAX_CAPACITY NUMBER (3)
All MAX_CAPACITY values are greater than 10. Which two SQL statements correctly use subqueries? (Choose two.)	 Označit pro zhodnocení 
(1) Body 

 	 	 	(Vyberte všechny správné odpovědi)	 

SELECT * 
FROM class_assignments 
WHERE max_capacity = (SELECT AVG(max_capacity) FROM class_assignments);
(*)

SELECT * 
FROM teachers 
WHERE teacher_id = (SELECT teacher_id FROM teachers WHERE class_id = 45963);
(*)

SELECT * 
FROM teachers 
WHERE teacher_id = (SELECT teacher_id, class_assignments WHERE max_capacity > 0);

SELECT * 
FROM teachers 
WHERE teacher_id LIKE (SELECT teacher_id FROM class_assignments WHERE max_capacity > 1000);

SELECT * 
FROM class_assignments 
max_capacity = (SELECT AVG(max_capacity) FROM class_assignments GROUP BY teacher_id);

 	 	 	 	 	 	Correct

 	 	27.  	Which operator can be used with a multiple-row subquery?	 Označit pro zhodnocení 
(1) Body 

IN (*)

<>

=

LIKE

 	 	 	 	 	 	Correct

 	 	28.  	Using a subquery in which clause will return a syntax error?	 Označit pro zhodnocení 
(1) Body 

WHERE

FROM

HAVING

You can use subqueries in all of the above clauses. (*)

 	 	 	 	 	 	Correct

 	 	29.  	Which operator can be used with subqueries that return only one row?	 Označit pro zhodnocení 
(1) Body 

LIKE (*)

ANY

ALL

IN

 	 	 	 	 	 	Correct

 	 	30.  	Which of the following is TRUE regarding the order of subquery execution?	 Označit pro zhodnocení 
(1) Body 

The outer query is executed first

The subquery executes once after the main query

The subquery executes once before the main query (*)

The result of the main query is used with the subquery

 	 	 	 	 	 	Correct

 	Stránka 3 z 5	 	 

Test: Mid Term Exam Semester 2 - Part II

Projděte své odpovědi, odezvy a hodnocení otázek dole. Hvězdička (*) značí správnou odpověď.

 	Semester 2 Mid Term Exam Part II covers Sections 5-7 of Database Programming with SQL also.	 

 	Section 6
 	(Odpovězte na všechny otázky v této části)

 	 	31.  	You need to create a report to display the names of products with a cost value greater than the average cost of all products. Which SELECT statement should you use?	 Označit pro zhodnocení 
(1) Body 

SELECT product_name 
FROM products 
WHERE cost > (SELECT AVG(cost) 
FROM product);
(*)

SELECT product_name 
FROM products 
WHERE cost > AVG(cost);

SELECT AVG(cost), product_name 
FROM products 
WHERE cost > AVG(cost) 
GROUP by product_name;

SELECT product_name 
FROM (SELECT AVG(cost) FROM product) 
WHERE cost > AVG(cost);

 	 	 	 	 	 	Correct

 	Section 5
 	(Odpovězte na všechny otázky v této části)

 	 	32.  	You use ROLLUP to:	 Označit pro zhodnocení 
(1) Body 

produce subtotal values (*)

cross-tabulate values

produce a single result set

 	 	 	 	 	 	Correct

 	 	33.  	CUBE can be applied to all aggregate functions including AVG, SUM, MIN, MAX, and COUNT. True or False?	 Označit pro zhodnocení 
(1) Body 

True (*)

False

 	 	 	 	 	 	Correct

 	 	34.  	You use GROUPING function to:	 Označit pro zhodnocení 
(1) Body 

Produce subtotal and cross-tabulated values

Identify the extra row values created by either a ROLLUP or CUBE operation (*)

Aggregate rows using SUM, MIN, MAX, and COUNT

 	 	 	 	 	 	Correct

 	 	35.  	You use GROUPING function to ______ database rows from tabulated rows.	 Označit pro zhodnocení 
(1) Body 

CREATE

DISTINGUISH (*)

COMPUTE

COUNT

 	 	 	 	 	 	Correct

 	 	36.  	The PRODUCTS table contains these columns:
PRODUCT_ID NUMBER(9) PK 
CATEGORY_ID VARCHAR2(10) 
LOCATION_ID NUMBER(9) 
DESCRIPTION VARCHAR2(30) 
COST NUMBER(7,2) 
PRICE NUMBER(7,2) 
QUANTITY NUMBER
You display the total of the extended costs for each product category by location. 
You need to include only the products that have a price less than $25.00. 
The extended cost of each item equals the quantity value multiplied by the cost value. 
Which SQL statement will display the desired result?	 Označit pro zhodnocení 
(1) Body 

SELECT category_id, SUM(cost * quantity) TOTAL,location_id 
FROM products 
WHERE price > 25.00 
GROUP BY category_id, location_id;

SELECT SUM(cost * quantity) TOTAL, location_id 
FROM products 
WHERE price < 25.00 <br /> GROUP BY location_id;

SELECT category_id, SUM(cost * quantity) TOTAL, location_id 
FROM products 
WHERE price < 25.00 <br /> GROUP BY category_id, location_id;
(*)

SELECT SUM(cost * quantity) TOTAL 
FROM products 
WHERE price < 25.00;

 	 	 	 	 	 	Correct

 	 	37.  	The PRODUCTS table contains these columns:
PROD_ID NUMBER(4) 
PROD_NAME VARCHAR(20) 
PROD_CAT VARCHAR2(15) 
PROD_PRICE NUMBER(5) 
PROD_QTY NUMBER(4)
You need to identify the minimum product price in each product category. 
Which statement could you use to accomplish this task?	 Označit pro zhodnocení 
(1) Body 

SELECT prod_cat, MIN (prod_price) 
FROM products 
GROUP BY prod_price;

SELECT prod_cat, MIN (prod_price) 
FROM products 
GROUP BY prod_cat;
(*)

SELECT MIN (prod_price), prod_cat 
FROM products 
GROUP BY MIN (prod_price), prod_cat;

SELECT prod_price, MIN (prod_cat) 
FROM products 
GROUP BY prod_cat;

 	 	 	 	 	 	Correct

 	 	38.  	The PLAYERS and TEAMS tables contain these columns:
PLAYERS 
PLAYER_ID NUMBER NOT NULL, PRIMARY KEY 
LAST_NAME VARCHAR2 (30) NOT NULL 
FIRST_NAME VARCHAR2 (25) NOT NULL
TEAM_ID NUMBER 
POSITION VARCHAR2 (25)
TEAMS 
TEAM_ID NUMBER NOT NULL, PRIMARY KEY 
TEAM_NAME VARCHAR2 (25)
You need to create a report that lists the names of each team with more than three goal keepers. 
Which SELECT statement will produce the desired result?	 Označit pro zhodnocení 
(1) Body 

SELECT t.team_name, COUNT(p.player_id) 
FROM players p, teams t 
ON (p.team_id = t.team_id) 
WHERE UPPER(p.position) = 'GOAL KEEPER' 
GROUP BY t.team_name;

SELECT t.team_name, COUNT(p.player_id) 
FROM players 
JOIN teams t ON (p.team_id = t.team_id) 
WHERE UPPER(p.position) = 'GOAL KEEPER' 
HAVING COUNT(p.player_id) > 3;

SELECT t.team_name, COUNT(p.player_id) 
FROM players p, teams t 
ON (p.team_id = t.team_id) 
WHERE UPPER(p.position) = 'GOAL KEEPER' 
GROUP BY t.team_name 
HAVING COUNT(p.player_id) > 3;

SELECT t.team_name, COUNT(p.player_id) 
FROM players p 
JOIN teams t ON (p.team_id = t.team_id) 
WHERE UPPER(p.position) = 'GOAL KEEPER' 
GROUP BY t.team_name 
HAVING COUNT(p.player_id) > 3;
(*)

 	 	 	 	 	 	Correct

 	 	39.  	Evaluate this SELECT statement:
SELECT SUM(salary), department_id, manager_id 
FROM employees 
GROUP BY department_id, manager_id;
Which SELECT clause allows you to restrict the rows returned, based on a group function?	 Označit pro zhodnocení 
(1) Body 

HAVING SUM(salary) > 100000 (*)

WHERE SUM(salary) > 100000

WHERE salary > 100000

HAVING salary > 100000

 	 	 	 	 	 	Correct

 	 	40.  	Evaluate this SELECT statement: 
SELECT MAX(salary), department_id 
FROM employees 
GROUP BY department_id;
Which values are displayed?	 Označit pro zhodnocení 
(1) Body 

The highest salary for all employees.

The highest salary in each department. (*)

The employees with the highest salaries.

The employee with the highest salary for each department.

 	 	 	 	 	 	Correct

 	Stránka 4 z 5	 	 

Test: Mid Term Exam Semester 2 - Part II

Projděte své odpovědi, odezvy a hodnocení otázek dole. Hvězdička (*) značí správnou odpověď.

 	Semester 2 Mid Term Exam Part II covers Sections 5-7 of Database Programming with SQL also.	 

 	Section 5
 	(Odpovězte na všechny otázky v této části)

 	 	41.  	Evaluate this SELECT statement:
SELECT COUNT(employee_id), department_id 
FROM employees 
GROUP BY department_id;
You only want to include employees who earn more than 15000. 
Which clause should you include in the SELECT statement?	 Označit pro zhodnocení 
(1) Body 

WHERE salary > 15000 (*)

HAVING salary > 15000

WHERE SUM(salary) > 15000

HAVING SUM(salary) > 15000

 	 	 	 	 	 	Correct

 	 	42.  	What is the correct order of clauses in a SELECT statement?	 Označit pro zhodnocení 
(1) Body 

SELECT 
FROM 
WHERE 
ORDER BY 
GROUP BY 
HAVING

SELECT 
FROM 
HAVING 
GROUP BY 
WHERE 
ORDER BY

SELECT 
FROM 
WHERE 
GROUP BY 
HAVING 
ORDER BY
(*)

SELECT 
FROM 
WHERE 
HAVING 
ORDER BY 
GROUP BY

 	 	 	 	 	 	Correct

 	 	43.  	The EMPLOYEES table contains these columns:
ID_NUMBER NUMBER Primary Key 
NAME VARCHAR2 (30) 
DEPARTMENT_ID NUMBER 
SALARY NUMBER (7,2) 
HIRE_DATE DATE
Evaluate this SQL statement:
SELECT id_number, name, department_id, SUM(salary) 
FROM employees 
WHERE salary > 25000 
GROUP BY department_id, id_number, name 
ORDER BY hire_date;
Why will this statement cause an error?	 Označit pro zhodnocení 
(1) Body 

The HAVING clause is missing.

The WHERE clause contains a syntax error.

The SALARY column is NOT included in the GROUP BY clause.

The HIRE_DATE column is NOT included in the GROUP BY clause. (*)

 	 	 	 	 	 	Correct

 	 	44.  	Evaluate this statement:
SELECT department_id, AVG(salary) 
FROM employees 
WHERE job_id <> 69879 
GROUP BY job_id, department_id 
HAVING AVG(salary) > 35000 
ORDER BY department_id;
Which clauses restricts the result? Choose two.	 Označit pro zhodnocení 
(1) Body 

 	 	 	(Vyberte všechny správné odpovědi)	 

SELECT department_id, AVG(salary)

WHERE job_id <> 69879 (*)

GROUP BY job_id, department_id

HAVING AVG(salary) > 35000 (*)

 	 	 	 	 	 	Correct

 	 	45.  	Which statement about group functions is true?	 Označit pro zhodnocení 
(1) Body 

Group functions ignore null values. (*)

Group functions can only be used in a SELECT list.

Group functions can be used in a WHERE clause.

A query that includes a group function in the SELECT list must include a GROUP BY clause.

 	 	 	 	 	 	Correct

 	 	46.  	The PAYMENT table contains these columns:
PAYMENT_ID NUMBER(9) PK 
PAYMENT_DATE DATE 
CUSTOMER_ID NUMBER(9)
Which SELECT statement could you use to display the number of times each customer payment was made between January 1, 2003 and June 30, 2003 ?	 Označit pro zhodnocení 
(1) Body 

SELECT customer_id, COUNT(payment_id) 
FROM payment 
WHERE payment_date BETWEEN '01-JAN-2003' AND '30-JUN-2003' 
GROUP BY customer_id;
(*)

SELECT COUNT(payment_id) 
FROM payment 
WHERE payment_date BETWEEN '01-JAN-2003' AND '30-JUN-2003';

SELECT customer_id, COUNT(payment_id) 
FROM payment 
WHERE payment_date BETWEEN '01-JAN-2003' AND '30-JUN-2003';

SELECT COUNT(payment_id) 
FROM payment 
WHERE payment_date BETWEEN '01-JAN-2003' AND '30-JUN-2003' 
GROUP BY customer_id;

 	 	 	 	 	 	Correct

 	 	47.  	What is the best explanation as to why this SQL statement will NOT execute?
SELECT department_id "Department", AVG (salary)"Average" 
FROM employees 
GROUP BY Department;	 Označit pro zhodnocení 
(1) Body 

Salaries cannot be averaged as not all the numbers will divide evenly.

You cannot use a column alias in the GROUP BY clause. (*)

The GROUP BY clause must have something to GROUP.

The department id is not listed in the departments table.

 	 	 	 	 	 	Correct

 	 	48.  	The PLAYERS table contains these columns:
PLAYER_ID NUMBER PK 
PLAYER_NAME VARCHAR2 (30) 
TEAM_ID NUMBER 
HIRE_DATE DATE 
SALARY NUMBER (8,2)
Which clauses represent valid uses of aggregate functions? (Choose three.)	 Označit pro zhodnocení 
(1) Body 

 	 	 	(Vyberte všechny správné odpovědi)	 

ORDER BY AVG(salary) (*)

GROUP BY MAX(salary)

SELECT AVG(NVL(salary, 0)) (*)

HAVING MAX(salary) > 10000 (*)

WHERE hire_date > AVG(hire_date)

 	 	 	 	 	 	Correct

 	 	49.  	To control the order of rows returned using SET operators, the ORDER BY clause is used ______ and is placed in the _____ SELECT statement of the query.	 Označit pro zhodnocení 
(1) Body 

ONCE; FIRST

TWICE; FIRST

ONCE; LAST (*)

IN ALL; LAST

 	 	 	 	 	 	Correct

 	 	50.  	When using SET operators the number of columns and the data types of the columns must be identical in all of the SELECT statements used in the query. True or False.	 Označit pro zhodnocení 
(1) Body 

True (*)

False

 	 	 	 	 	 	Incorrect. Refer to Section 5 Lesson 3.

 	Stránka 5 z 5
Follow

Get every new post delivered to your Inbox.