Practical of 1z0-047 exam answers materials and preparation for Oracle certification for consumer, Real Success Guaranteed with Updated 1z0-047 pdf dumps vce Materials. 100% PASS Oracle Database SQL Expert exam Today!

2016 May 1z0-047 Study Guide Questions:

Q131. View the Exhibit and examine the descriptions for ORDERS and ORDER_ITEMS tables. 

Evaluate the following SQL statement: 

SELECT o.customer_id, oi.product_id, SUM(oi.unit_price*oi. quantity) "Order Amount" 

FROM order_items oi JOIN orders o 

ON oi.order_id = o.order_id 

GROUP BY CUBE (o.customer_id, oi.product_id); 


Which three statements are true regarding the output of this SQL statement? (Choose three.) 



A. t wouldreturn thesubtotals for theOrder Amount of every CUSTOMER_ID. 

B. twould returnthesubtotals fortheOrderAmountfor every PRODUCT_ID. 

C. twould return the subtotals fortheOrder Amount of every PRODUCT_IDandCUSTOMER_ID asonegroup. 

D. t would return the subtotals for the Order Amount of every CUSTOMER_ID and PRODUCT_ID as one group. 

E. t wouldreturnonly thegrandtotal for theOrderAmount ofeveryCUSTOMER_ID and PRODUCT_ID as onegroup. 

Answer: ABD


Q132. View the Exhibit and examine the structure of EMPLOYEES and JOB_IHISTORY tables. 

The EMPLOYEES table maintains the most recent information regarding salary, department, and job for all the employees. The JOB_HISTORY table maintains the record for all the job changes for the employees. You want to delete all the records from the JOB_HISTORY table that are repeated in the EMPLOYEES table. 

Which two SQL statements can you execute to accomplish the task? (Choose two.) 


A. DELETE FROM job_history j WHERE employee_id = (SELECT employee_id FROM employees e WHERE j.employee_id = e.employee_id) AND job _id = (SELECT job _id FROM employees e WHERE j.job_id = e.job_id); 

B. DELETE FROM job_history j WHERE (employee_id, job _id) = ALL (SELECT employee_id, job_id FROM employees e WHERE j.employee_id = e.employee_id and j.job_id = e.job_id) 

C. DELETE FROM job_history j WHERE employee_id = (SELECT employee_id 

FROM employees e 

WHERE j.employee_id = e.employee_id and j.job_id = e.job_id) 

D. DELETE FROM job_history j WHERE (employee_id, job _id) = (SELECT employee_id, job_id FROM employees e WHERE j.employee_id = e.employee_id and j.job_id = e.job_id) 

Answer: C,D


Q133. View the Exhibit and examine the structure of the ORD table. 


Evaluate the following SQL statements that are executed in a user session in the specified order: CREATE SEQUENCE ord_seq; 

SELECT ord_seq.nextval FROM dual; 

INSERT INTO ord 

VALUES (ord_seq.CURRVAL, 25-jan-2007',101); 

UPDATE ord 

SET ord_no= ord_seq.NEXTVAL 

WHERE cust_id =101; 

What would be the outcome of the above statements? 

A. All the statements would execute successfullyandthe ORD_NO column would containthevalue 2 for the CUSTJD101. 

B. TheCREATE SEQUENCE command would not execute because the minimum value and maximum value for the sequence have not been specified. 

C. The CREATE SEQUENCE command wouldnotexecute because the starting value of the sequence and the incrementvaluehave not been specified. 

D. Allthe statementswould execute successfully and the ORD_NO column wouldhave the value 20 for the CUST_ID101becausethedefault CACHE value is 20. 

Answer: A


2passeasy.com

Rebirth 1z0-047 free dumps pdf:

Q134. Which two statements best describe the benefits of using the WITH clause? (Choose two.) 

A. It enables users to store the results of a query permanently. 

B. It enables users to store the query block permanently in the memory and use it to create complex queries. 

C. It enables users to reuse the same query block in a SELECT statement, if it occurs more than once in a complex query. 

D. It can improve the performance of a large query by storing the result of a query block having the WITH clause in the user's temporary tablespace. 

Answer: CD


Q135. Which two statements best describe the benefits of using the WITH clause? (Choose two.) 

A. It enables users to store the results of a query permanently. 

B. It enables users to store the query block permanently in the memory and use it to create complex queries. 

C. It enables users to reuse the same query block in a SELECT statement, if it occurs more than once in a complex query. 

D. It can improve the performance of a large query by storing the result of a query block having the WITH clause in the user's temporary tablespace. 

Answer: CD


Q136. Evaluate the following statement: 

INSERT ALL 

WHEN order_total < 10000 THEN 

INTO small_orders 

WHEN order_total > 10000 AND order_total < 20000 THEN 

INTO medium_orders 

WHEN order_total > 2000000 THEN 

INTO large_orders 

SELECT order_id, order_total, customer_id 

FROM orders; 

Which statement is true regarding the evaluation of rows returned by the subquery in the INSERT statement? 

A. They areevaluatedby allthe three WHENclauses regardlessofthe resultsof the evaluation ofany other WHEN clause. 

B. They are evaluated by thefirst WHENclause. If the condition is true, then the row would be evaluated by the subsequent WHEN clauses. 

C. They are evaluated by the first WHEN clause. If the condition isfalse,thenthe row wouldbeevaluated by the subsequentWHENclauses. 

D. TheINSERT statement would give an error becausetheELSE clause is notpresent forsupport in case none of theWHENclauses are true. 

Answer: A


2passeasy.com

Accurate 1z0-047 dumps free:

Q137. View the Exhibit and examine the details of the ORDER_ITEMS table. 

Evaluate the following SQL statements: 

Statement 1: 

SELECT MAX(unit_price*quantity) "Maximum Order" 


FROM order items; 

Statement 2: 

SELECT MAX(unit_price*quantity) "Maximum Order" 


FROM order_items GROUP BY order_id; 

Which statements are true regarding the output of these SQL statements? (Choose all that apply. 



A. Statement 1 would return only one row of output. 

B. Both the statements would give the same output. 

C. Statement 2 would return multiple rows of output. 

D. Statement 1 would not return any row because the GROUP BY clause is missing. 

E. Both statements would ignore NULL values for the UNIT_PRICE and QUANTITY columns. 

Answer: ACE


Q138. Evaluate the following SQL statements that are issued in the given order: 

CREATE TABLE emp 

(emp_no NUMBER(2) CONSTRAINT emp_emp_no_pk PRIMARY KEY, 

enameVARCHAR2(15), 

salary NUMBER(8,2), 

mgr_no NUMBER(2) CONSTRAINT emp_mgr_fk REFERENCES emp); 


ALTER TABLE emp 

DISABLE CONSTRAINT emp_emp_no_pk CASCADE; 


ALTER TABLE emp 

ENABLE CONSTRAINT emp_emp_no_pk; 


What would be the status of the foreign key EMP_MGR_FK? 

A. It would be automatically enabled and deferred. 

B. It would be automatically enabled and immediate. 

C. It would remain disabled and has to be enabled manually using the ALTER TABLE command. 

D. It would remain disabled and can be enabled only by dropping the foreign key constraint and re-creating it. 

Answer: C


Q139. The following are the steps for a correlated subquery, listed in random order: 1) The WHERE clause of the outer query is evaluated. 

2) The candidate row is fetched from the table specified in the outer query. 

3) The procedure is repeated for the subsequent rows of the table, till all the rows are processed. 

4) Rows are returned by the inner query, after being evaluated with the value from the candidate row in the outer query. Identify the option that contains the steps in the correct sequence in which the Oracle server evaluates a correlated subquery. 

A. 4,2,1,3 

B. 4,1,2,3 

C. 2,4,1,3 

D. 2,1,4,3 

Answer: C


Q140. Which three statements are true regarding group functions? (Choose three.) 

A. They can be used on columns or expressions. 

B. They can be passed as an argument to another group function. 

C. They can be used only with a SQL statement that has the GROUP BY clause. 

D. They can be used on only one column in the SELECT clause of a SQL statement. 

E. They can be used along with the single-row function in the SELECT clause of a SQL statement. 

Answer: ABE