Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Question #:1

View the Exhibit and examine the structure of the ORDER_ITEMS table.

Examine the following SQL statement:

SELECT order_id, product_id, unit_price

Pass with Valid Exam Questions Pool 1


Oracle - 1z0-071

FROM order_items

WHERE unit_price =

(SELECT MAX(unit_price)

FROM order_items

GROUP BY order_id);

You want to display the PRODUCT_ID of the product that has the highest UNIT_PRICE per ORDER_ID.
What correction should be made in the above SQL statement to achieve this?

A. Remove the GROUP BY clause from the subquery and place it in the main query

B. Replace = with the >ANY operator

C. Replace = with the >ALL operator

D. Replace = with the IN operator

Pass with Valid Exam Questions Pool 2


Oracle - 1z0-071

Question #:2

Evaluate the following CREATE TABLE commands:

CREATE_TABLE orders

(ord_no NUMBER (2) CONSTRAINT ord_pk PRIMARY KEY,

ord_date DATE,

cust_id NUMBER (4));

CREATE TABLE ord_items

(ord _no NUMBER (2),

item_no NUMBER(3),

qty NUMBER (3) CHECK (qty BETWEEEN 100 AND 200),

expiry_date date CHECK (expiry_date> SYSDATE),

CONSTRAINT it_pk PRIMARY KEY (ord_no, item_no),

CONSTARAINT ord_fk FOREIGN KEY (ord_no) REFERENCES orders (ord_no) );

Why would the ORD_ITEMS table not get created?

A. SYSDATE cannot be used with the CHECK constraint.

B. The BETWEEN clause cannot be used twice for the same table.

C. The CHECK constraint cannot be placed on columns having the DATE data type.

D. ORD_NO and ITEM_NO cannot be used as a composite primary key because ORD_NO is also the
FOREIGN KEY.

Pass with Valid Exam Questions Pool 3


Oracle - 1z0-071

Question #:3

View the Exhibit and examine the description for the SALES and CHANNELS tables.

Pass with Valid Exam Questions Pool 4


Oracle - 1z0-071

You issued this SQL statement:

Which statement is true regarding the result? (Choose the best answer.)

A. The statement will fail because the subquery in the VALUES clause is not enclosed within single
quotation marks.

B. The statement will fail because a subquery cannot be used in a VALUES clause.

C. The statement will execute and a new row will be inserted in the SALES table.

D. The statement will fail because the VALUES clause is not required with the subquery.

Pass with Valid Exam Questions Pool 5


Oracle - 1z0-071

Question #:4

View the exhibit and examine the structure and data in the INVOICE table.

Which two SQL statements would execute successfully? (Choose two.)

A. SELECT MAX(AVG(SYSDATE -inv_date))FROM invoice;

B. SELECT AVG(inv_date)FROM invoice;

C. SELECT MAX(inv_date),MIN(cust_id)FROM invoice;

D. SELECT AVG( inv_date - SYSDATE), AVG(inv_amt)FROM invoice;

Pass with Valid Exam Questions Pool 6


Oracle - 1z0-071

Question #:5

Which two are true about queries using set operators (UNION, UNION ALL, INTERSECT and MINUS?

A. The name off each column in the first Select list must match the name of the corresponding column In
each subsequent select list.

B. The must be an equal number of columns In each select list.

C. None of the set operators can be used when selecting CLOB columns.

D. Each select statement In the query can have an order by clause.

E. The FOR update clause cannot be specified.

Pass with Valid Exam Questions Pool 7


Oracle - 1z0-071
C.

Question #:6

Which statement is true about the INTERSECT operator used in compound queries?

A. INTERSECT is of lower precedence than UNION or UNION ALL.

B. Multiple INTERSECT operators are not possible in the same SQL statement.

C. It ignores NULLs.

D. It processes NULLs in the selected columns.

Question #:7

Which two statements are true regarding the SQL GROUP BY clause? (Choose two.)

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

B. Using the WHERE clause after the GROUP BY clause excludes rows after creating groups.

C. The GROUP BY clause is mandatory if you are using an aggregating function in the SELECT clause.

D. Using the WHERE clause before the GROUP BY clause excludes rows before creating groups.

E. If the SELECT clause has an aggregating function, then columns without an aggregating function in the
SELECT clause should be included in the GROUP BY clause.

B. All users have permissions to access all information in the data dictionary by default.

C. The data dictionary is constantly updated to reflect changes to database objects, permissions, and data.

D. All user actions are recorded in the data dictionary.

E. Base tables in the data dictionary have the prefix DBA_.

Pass with Valid Exam Questions Pool 8

You might also like