Free 1Z0-071 Exam Braindumps

Pass your Oracle Database 12c SQL exam with these free Questions and Answers

Page 2 of 64
QUESTION 1

View the Exhibit and examine the data in the employees table.
1Z0-071 dumps exhibit
You want to generate a report showing the total compensation paid to each employee to date. You issue the following query:
1Z0-071 dumps exhibit
What is the outcome?

  1. A. It executes successfully but does not give the correct output.
  2. B. It generates an error because the concatenation operator can be used to combine only two items.
  3. C. It generates an error because the usage of the round function in the expression is not valid
  4. D. It generates an error because the alias is not valid.
  5. E. It executes successfully and gives the correct output.

Correct Answer: A

QUESTION 2

View the Exhibit and examine the structure of ORDERS and ORDER_ITEMS tables.
ORDER_ID is the primary key in the ORDERS table. It is also the foreign key in the ORDER_ITEMS table wherein it is created with the ON DELETE CASCADE option.
Which DELETE statement would execute successfully?
1Z0-071 dumps exhibit

  1. A. DELETE orders o, order_items IWHERE o.order_id = i.order_id;
  2. B. DELETEFROM ordersWHERE (SELECT order_idFROM order_items);
  3. C. DELETE ordersWHERE order_total < 1000>DELETE order_idFROM ordersWHERE order_total < 1000;

Correct Answer: B

QUESTION 3

View the Exhibit and examine the structure of the CUSTOMERS and CUST_HISTORY tables.
1Z0-071 dumps exhibit
The CUSTOMERS table contains the current location of all currently active customers.
The CUST_HISTORY table stores historical details relating to any changes in the location of all current as well as previous customers who are no longer active with the company.
You need to find those customers who have never changed their address. Which SET operator would you use to get the required output?

  1. A. INTERSECT
  2. B. UNION ALL
  3. C. MINUS
  4. D. UNION

Correct Answer: C

QUESTION 4

Examine the structure of the EMPLOYEES table. NameNull?Type
---------------------- ------------ EMPLOYEE_IDNOT NULLNUMBER(6) FIRST_NAMEVARCHAR2(20) LAST_NAMENOT NULLVARCHAR2(25) EMAILNOT NULLVARCHAR2(25) PHONE NUMBERVARCHAR2(20) HIRE_DATENOT NULLDATE JOB_IDNOT NULLVARCHAR2(10) SALARYNUMBER(8,2) COMMISSION_PCTNUMBER(2,2) MANAGER_IDNUMBER(6) DEPARTMENT_IDNUMBER(4)
There is a parent/child relationship between EMPLOYEE_ID and MANAGER_ID.
You want to display the last names and manager IDs of employees who work for the same manager as the employee whose EMPLOYEE_ID is 123.
Which query provides the correct output?

  1. A. SELECT e.last_name, m.manager_idFROM employees e RIGHT OUTER JOIN employees mon (e.manager_id = m.employee_id)AND e.employee_id = 123;
  2. B. SELECT e.last_name, m.manager_idFROM employees e RIGHT OUTER JOIN employees mon (e.employee_id = m.manager_id)WHERE e.employee_id = 123;
  3. C. SELECT e.last_name, e.manager_idFROM employees e RIGHT OUTER JOIN employees mon (e.employee_id = m.employee_id)WHERE e.employee_id = 123;
  4. D. SELECT m.last_name, e.manager_idFROM employees e LEFT OUTER JOIN employees mon (e.manager_id = m.manager_id)WHERE e.employee_id = 123;

Correct Answer: B

QUESTION 5

View the Exhibit and examine the structure of the ORDER_ITEMS table. (Choose the best answer.)
1Z0-071 dumps exhibit
You must select the ORDER_ID of the order that has the highest total value among all the orders in the ORDER_ITEMS table.
Which query would produce the desired result?

  1. A. SELECT order_idFROM order_itemsGROUP BY order_idHAVING SUM(unit_price*quantity) = (SELECT MAX (SUM(unit_price*quantity))FROM order_items GROUP BY order_id);
  2. B. SELECT order_idFROM order_itemsWHERE(unit_price*quantity) = (SELECT MAX (SUM(unit_price*quantity)FROM order_items) GROUP BY order_id);
  3. C. SELECT order_idFROM order_itemsWHERE(unit_price*quantity) = MAX(unit_price*quantity)GROUP BY order_id);
  4. D. SELECT order_idFROM order_itemsWHERE (unit_price*quantity) = (SELECT MAX(unit_price*quantity)FROM order_itemsGROUP BY order_id)

Correct Answer: A

Page 2 of 64

Post your Comments and Discuss Oracle 1Z0-071 exam with other Community members: