Proper study guides for Improved Oracle Oracle Database 12c SQL Fundamentals certified begins with Oracle oracle database 12c sql fundamentals 1z0 061 pdf free download preparation products which designed to deliver the Download 1z0 061 dumps pdf questions by making you pass the oracle database 12c sql fundamentals 1z0 061 pdf free download test at your first time. Try the free oracle database 12c sql fundamentals 1z0 061 pdf free download demo right now.

Q11. Examine the data in the PROMO_BEGIN_DATE column of the promotions table: 

You want to display the number of promotions started in 1999 and 2000. Which query gives the correct output? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Q12. Evaluate the following SQL statement: 

Which statement is true regarding the outcome of the above query? 

A. It executes successfully and displays rows in the descending order of PROMO_CATEGORY. 

B. It produces an error because positional notation cannot be used in the order by clause with set operators. 

C. It executes successfully but ignores the order by clause because it is not located at the end of the compound statement. 

D. It produces an error because the order by clause should appear only at the end of a compound query-that is, with the last select statement. 

Answer:


Q13. View the Exhibit and examine the structure of the promotions table. 

Evaluate the following SQL statement: 

Which statement is true regarding the outcome of the above query? 

A. It shows COST_REMARK for all the promos in the table. 

B. It produces an error because the SUBQUERY gives an error. 

C. It shows COST_REMARK for all the promos in the promo category 'TV' 

D. It produces an error because SUBQUERIES cannot be used with the case expression. 

Answer:


Q14. Which normal form is a table in if it has no multi-valued attributes and no partial dependencies? 

A. First normal form 

B. Second normal form 

C. Third normal form 

D. Fourth normal form 

Answer:


Q15. Examine the types and examples of relationships that follow: 

1. One-to-one a) Teacher to students 

2. One-to-many b) Employees to Manager 

3. Many-to-one c) Person to SSN 

4. Many-to-many d) Customers to products 

Which option indicates the correctly matched relationships? 

A. 1-a, 2-b, 3-c, and 4-d 

B. 1-c, 2-d, 3-a, and 4-b 

C. 1-c, 2-a, 3-b, and 4-d 

D. 1-d, 2-b, 3-a, and 4-c 

Answer:


Q16. Which two statements are true regarding single row functions? 

A. MOD: returns the quotient of a division B. TRUNC: can be used with number and date values 

C. CONCAT: can be used to combine any number of values 

D. SYSDATE: returns the database server current date and time 

E. INSTR: can be used to find only the first occurrence of a character in a string 

F. TRIM: can be used to remove all the occurrences of a character from a string 

Answer: B,D 

Explanation: 

ROUND: Rounds value to a specified decimal TRUNC: Truncates value to a specified decimal MOD: Returns remainder of division SYSDATE is a date function that returns the current database server date and time. 

Date-Manipulation Functions Date functions operate on Oracle dates. All date functions return a value of the DATE data type except MONTHS_BETWEEN, which returns a numeric value. MONTHS_BETWEEN(date1, date2): Finds the number of months between date1 and date2. The result can be positive or negative. If date1 is later than date2, the result is positive; if date1 is earlier than date2, the result is negative. The noninteger part of the result represents a portion of the month. ADD_MONTHS(date, n): Adds n number of calendar months to date. The value of n must be an integer and can be negative. NEXT_DAY(date, 'char'): Finds the date of the next specified day of the week ('char') following date. The value of char may be a number representing a day or a character string. LAST_DAY(date): Finds the date of the last day of the month that contains date The above list is a subset of the available date functions. ROUND and TRUNC number functions can also be used to manipulate the date values as shown below: ROUND(date[, 'fmt']): Returns date rounded to the unit that is specified by the format model fmt. If the format model fmt is omitted, date is rounded to the nearest day. TRUNC(date[, 'fmt']): Returns date with the time portion of the day truncated to the unit that is specified by the format model fmt. If the format model fmt is omitted, date is truncated to the nearest day. 

The CONCAT Function The CONCAT function joins two character literals, columns, or expressions to yield one larger character expression. Numeric and date literals are implicitly cast as characters when they occur as parameters to the CONCAT function. Numeric or date expressions are evaluated before being converted to strings ready to be concatenated. The CONCAT function takes two parameters. Its syntax is CONCAT(s1, s2), where s1 and s2 represent string literals, character column values, or expressions resulting in character values. 

The INSTR(source string, search item, [start position], [nth occurrence of search item]) 

function returns a number that represents the position in the source string, beginning from 

the given start position, where the nth occurrence of the search item begins: 

instr('http://www.domain.com', '.', 1, 2) = 18 

The TRIM function literally trims off leading or trailing (or both) character strings from a 

given source string: 


Q17. You need to display the first names of all customers from the customers table that contain the character 'e' and have the character 'a' in the second last position. 

Which query would give the required output? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: 

The SUBSTR(string, start position, number of characters) function accepts three parameters and returns a string consisting of the number of characters extracted from the source string, beginning at the specified start position: 

substr('http://www.domain.com', 12, 6) = domain 

The position at which the first character of the returned string begins. 

When position is 0 (zero), then it is treated as 1. 

When position is positive, then the function counts from the beginning of string to find the first character. 

When position is negative, then the function counts backward from the end of string. substring_length 

The length of the returned string. SUBSTR calculates lengths using characters as defined by the input character set. SUBSTRB uses bytes instead of characters. SUBSTRC uses 

Unicode complete characters. 

SUBSTR2 uses UCS2 code points. SUBSTR4 uses UCS4 code points. 

When you do not specify a value for this argument, then the function 

The INSTR(source string, search item, [start position], [nth occurrence of search item]) function returns a number that represents the position in the source string, beginning from the given start position, where the nth occurrence of the search item begins: 

instr('http://www.domain.com', '.', 1, 2) = 18 


Q18. Which statement is true regarding the default behavior of the order by clause? 

A. In a character sort, the values are case-sensitive. 

B. NULL values are not considered at all by the sort operation. 

C. Only those columns that are specified in the select list can be used in the order by clause. 

D. Numeric values are displayed from the maximum to the minimum value if they have decimal positions. 

Answer:

Explanation: 

Character Strings and Dates 

Character strings and date values are enclosed with single quotation marks. 

Character values are case-sensitive and date values are format-sensitive. 

The default date display format is DD-MON-RR. 


Q19. You want to display 5 percent of the rows from the sales table for products with the lowest AMOUNT_SOLD and also want to include the rows that have the same AMOUNT_SOLD even if this causes the output to exceed 5 percent of the rows. 

Which query will provide the required result? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Q20. Examine the structure and data of the CUST_TRANS table: 

Dates are stored in the default date format dd-mon-rr in the CUST_TRANS table. Which three SQL statements would execute successfully? 

A. SELECT transdate + '10' FROM cust_trans; 

B. SELECT * FROM cust_trans WHERE transdate = '01-01-07' 

C. SELECT transamt FROM cust_trans WHERE custno > "11"; 

D. SELECT * FROM cust_trans WHERE transdate='01-JANUARY-07' 

E. SELECT custno + 'A' FROM cust_trans WHERE transamt > 2000; 

Answer: A,C,D