Documente Academic
Documente Profesional
Documente Cultură
Item: 1 (Ref:1z0-007e.5.2.8)
S_ID NUMBER PK
NAME VARCHAR2(30)
LOCATION_ID NUMBER
ORDER_DT DATE
ORDER_AMOUNT NUMBER(8,2)
Which clauses represent valid uses of aggregate functions? (Choose all that apply.)
c FROM MAX(order_dt)
d
e
f
g
c SELECT SUM(order_dt)
d
e
f
g
c SELECT SUM(order_amount)
d
e
f
g
c SELECT MAX(AVG(order_amount))
d
e
f
g
Objective:
Aggregating Data using Group Functions
Sub-Objective:
Use group functions
Item: 2 (Ref:1z0-007e.2.2.5)
Click the Exhibit(s) button to examine the data in the PRODUCT table.
c The PRODUCT_IDs value for the last two records displayed are 140 and 126.
d
e
f
g
c The DESCRIPTION value for the first two records displayed is 'C 2pk-battery'.
d
e
f
g
c The DESCRIPTION value for the first two records displayed is 'AA 2pk-battery'.
d
e
f
g
Objective:
Restricting and Sorting Data
Sub-Objective:
Sort the rows retrieved by a query
Item: 3 (Ref:1z0-007e.4.1.1)
PRODUCT
----------------
PRODUCT_ID NUMBER
PRODUCT_NAME VARCHAR2(25)
SUPPLIER_ID NUMBER
QTY_IN_STOCK NUMBER
QTY_ON_ORDER NUMBER
REORDER_LEVEL NUMBER
STYLE
---------------
STYLE_ID NUMBER
NAME VARCHAR2(15)
COLOR VARCHAR2(10)
You want to create a report displaying all possible PRODUCT_ID and STYLE_ID combinations. Which three
queries could you use? (Choose three.)
Objective:
Displaying Data from Multiple Tables
Sub-Objective:
Write SELECT statements to access data from more than one table using equality and nonequality joins
Item: 4 (Ref:1z0-007e.4.1.3)
Click the Exhibit(s) button to examine the structures of the PO_HEADER and SUPPLIER tables.
Which two SQL statements will produce identical results? (Choose two.)
Objective:
Displaying Data from Multiple Tables
Sub-Objective:
Write SELECT statements to access data from more than one table using equality and nonequality joins
Which three statements concerning explicit data type conversions are true. (Choose three.)
c A number value may be converted to a date value using the TO_DATE function.
d
e
f
g
c A date value may be converted to a number value using the TO_NUMBER function.
d
e
f
g
c A character value may be converted to a date value using the TO_DATE function.
d
e
f
g
c A date value may be converted to a character value using the TO_DATE function.
d
e
f
g
c A date value may be converted to a character string using the TO_CHAR function.
d
e
f
g
c A number value may be converted to a character string using the TO_CHAR function.
d
e
f
g
c A number value may be converted to a character value using the TO_NUMBER function.
d
e
f
g
Objective:
Single-Row Functions
Sub-Objective:
Use conversion functions
Item: 6 (Ref:1z0-007e.6.3.3)
Which two statements regarding the valid use of single-row and multiple-row subqueries are true? (Choose two.)
c Single- and multiple-row subqueries can be used with the BETWEEN operator.
d
e
f
g
c Multiple-row subqueries can be used with both single-row and multiple-row operators.
d
e
f
g
c Multiple-row subqueries can be used in a WHERE clause and the INTO portion of an INSERT statement.
d
e
f
g
Objective:
Subqueries
Sub-Objective:
List the types of subqueries
Item: 7 (Ref:1z0-007e.6.3.4)
BOOK
----------
BOOK_ID VARCHAR2(25) PK
BOOK_NAME VARCHAR2(50)
PUBLISHER_ID NUMBER
COST NUMBER(5,2)
PRICE NUMBER(5,2)
PUBLISHER
--------------------
ID NUMBER PK
NAME VARCHAR2(30)
LOCATION VARCHAR2(20)
c UPDATE book
d
e
f
g
SET price = price * 2
WHERE publisher_id IN
(SELECT id
FROM publisher
WHERE UPPER(location) = 'BOSTON');
c UPDATE book
d
e
f
g
SET price = price * 2
WHERE publisher_id =
(SELECT id
FROM publisher
WHERE UPPER(location) = 'BOSTON');
c SELECT book_name, location, price
d
e
f
g
FROM book
WHERE publisher_id IN (SELECT id
FROM publisher
WHERE id = 54);
c SELECT book_name, price, cost
d
e
f
g
FROM book
WHERE publisher_id = (SELECT id
FROM publisher
WHERE LOWER(name) = 'master press');
c SELECT book_name, price, cost
d
e
f
g
FROM book
WHERE publisher_id IN (SELECT id
FROM publisher p JOIN book b
ON (p.id = b.publisher_id));
Objective:
Subqueries
Sub-Objective:
List the types of subqueries
Item: 8 (Ref:1z0-007e.4.1.2)
PRODUCT
-----------------
PRODUCT_ID NUMBER
PRODUCT_NAME VARCHAR2(25)
SUPPLIER_ID NUMBER
CATEGORY_ID NUMBER
QTY_PER_UNIT NUMBER
SUPPLIER
-----------------
SUPPLIER_ID NUMBER
SUPPLIER_NAME VARCHAR2(25)
ADDRESS VARCHAR2(30)
CITY VARCHAR2(25)
REGION VARCHAR2(10)
POSTAL_CODE VARCHAR2(11)
You want to create a query that will return an alphabetical list of products including the name of each product's
supplier. Only products in the PRODUCT table that have a supplier assigned should be included in your report.
Objective:
Displaying Data from Multiple Tables
Sub-Objective:
Write SELECT statements to access data from more than one table using equality and nonequality joins
Item: 9 (Ref:1z0-007e.5.4.3)
Which two statements about the evaluation of clauses in a SELECT statement are true? (Choose two.)
c The Oracle Server will evaluate a HAVING clause before a WHERE clause.
d
e
f
g
c The Oracle Server will evaluate a WHERE clause before a GROUP BY clause.
d
e
f
g
c The Oracle Server will evaluate a GROUP BY clause before a HAVING clause.
d
e
f
g
c The Oracle Server will evaluate an ORDER BY clause before a WHERE clause.
d
e
f
g
The Oracle Server will evaluate an ORDER BY clause before a HAVING clause.
Objective:
Aggregating Data using Group Functions
Sub-Objective:
Include or exclude grouped rows by using the HAVING clause
Item: 10 (Ref:1z0-007e.1.3.3)
Which statements pertaining to SQL and iSQL*Plus are true? (Choose all that apply.)
Objective:
Writing Basic SQL Select Statements
Sub-Objective:
Differentiate between SQL statements and iSQL*Plus commands
Item: 11 (Ref:1z0-007e.6.2.1)
Which of two statements regarding the use of subqueries are true? (Choose two.)
c A subquery can be used in a CREATE VIEW statement, regardless of the number of rows it returns.
d
e
f
g
c A subquery can be used in the VALUES clause of an INSERT statement, if it returns more than one row.
d
e
f
g
c A subquery can be used in the SET clause of an UPDATE statement, regardless of the number of rows it
d
e
f
g
returns.
c A subquery used in an INTO clause of a SELECT statement must return only one column, but can return
d
e
f
g
multiple rows.
c A subquery CANNOT be used in the GROUP BY clause of a SELECT statement.
d
e
f
g
Objective:
Subqueries
Sub-Objective:
Define subqueries
Item: 12 (Ref:1z0-007e.1.2.11)
ID 989958900
FIRST_NAME Jennifer
LAST_NAME Jones
ENROLL_DATE 12-SEP-01
You created a report that displays the column headings and data results. Click the Exhibit(s) button to examine
the output.
Which two statements concerning this report's SELECT statement are true? (Choose two.)
c One column alias is used for the LAST_NAME and FIRST_NAME columns.
d
e
f
g
c The display lengths of the LAST_NAME and FIRST_NAME columns are increased.
d
e
f
g
c Separate column aliases are used for the LAST_NAME, FIRST_NAME, and ENROLL_DATE columns.
d
e
f
g
Objective:
Writing Basic SQL Select Statements
Sub-Objective:
Execute a basic Select statement
Item: 13 (Ref:1z0-007e.3.1.4)
Which three functions can be used to manipulate character, number, and date column values? (Choose three.)
c RPAD
d
e
f
g
c TRUNC
d
e
f
g
c ROUND
d
e
f
g
c INSTR
d
e
f
g
c CONCAT
d
e
f
g
Objective:
Single-Row Functions
Sub-Objective:
Describe various types of functions available in SQL
Item: 14 (Ref:1z0-007e.7.2.1)
Objective:
Producing Readable Output with iSQL*Plus
Sub-Objective:
Produce more readable output
Item: 15 (Ref:1z0-007e.3.1.1)
c The SYSDATE function returns the host machine date and time.
d
e
f
g
c The ROUND number function returns a number rounded to the specified column value.
d
e
f
g
c The TRUNC date function returns a date with the time portion of the day truncated to the specified format
d
e
f
g
unit.
c The SUBSTR character function replaces a portion of a string, beginning at a defined character position for a
d
e
f
g
defined length.
Objective:
Single-Row Functions
Sub-Objective:
Describe various types of functions available in SQL
Item: 16 (Ref:1z0-007e.5.1.2)
You want to produce a report containing the total number of orders placed for a particular time period, including
the total value of the orders. Which two aggregate functions should you use in your SQL statement? (Choose
two.)
c SUM
d
e
f
g
c STOT
d
e
f
g
c TSUM
d
e
f
g
c VALUE
d
e
f
g
c COUNT
d
e
f
g
c STDDEV
d
e
f
g
Sub-Objective:
Identify the available group functions
Item: 17 (Ref:1z0-007e.2.1.7)
Click the Exhibit(s) button to examine the structure of the LINE_ITEM table.
You want to display order id numbers, product id numbers, and the quantity of the product ordered with these
desired results:
j an error statement
k
l
m
n
Objective:
Restricting and Sorting Data
Sub-Objective:
Limit the rows retrieved by a query
Item: 18 (Ref:1z0-007e.7.3.1)
START process_batch.sql
j &process_batch.sql
k
l
m
n
j GET process_batch.sql
k
l
m
n
j SAVE process_batch.sql
k
l
m
n
j EXECUTE process_batch.sql
k
l
m
n
Objective:
Producing Readable Output with iSQL*Plus
Sub-Objective:
Create and execute script files
Item: 19 (Ref:1z0-007e.2.1.6)
Click the Exhibit(s) button to examine the structure of the LINE_ITEM table.
This statement fails when executed. Which change will correct the problem?
j Enclose all of the column aliases in single quotes instead of double quotes.
k
l
m
n
j Remove the column alias from the WHERE clause and use the column name.
k
l
m
n
j Remove the column alias from the ORDER BY clause and use the column name.
k
l
m
n
Objective:
Restricting and Sorting Data
Sub-Objective:
Limit the rows retrieved by a query
Item: 20 (Ref:1z0-007e.1.2.12)
ITEM_ID NUMBER(9)
COST NUMBER(7,2)
RETAIL NUMBER(7,2)
The RETAIL and COST columns contain values greater than zero.
1. SELECT item_id, (retail * 1.25) + 5.00 - (cost * 1.10) - (cost * .10) AS Calculated Profit
FROM item;
2. SELECT item_id, retail * 1.25 + 5.00 - cost * 1.10 - cost * .10 "Calculated Profit"
FROM item;
Objective:
Writing Basic SQL Select Statements
Sub-Objective:
Execute a basic Select statement
Item: 21 (Ref:1z0-007e.7.1.1)
ID_NUMBER NUMBER PK
DESCRIPTION VARCHAR2(30)
SUPPLIER_ID NUMBER
You want to create a query that for each session allows the user to input a value for DESCRIPTION each time the
query runs. While the DESCRIPTION column is stored in upper case, you want the query to retrieve matching
values regardless of the case used when inputting the substitution variable value.
Objective:
Producing Readable Output with iSQL*Plus
Sub-Objective:
Produce queries that require a substitution variable