Week 12 Flashcards
Selected single row functions and Group functions
T/F: The Round function can be used to truncate numeric data.
False
What is the format argument element that displays the number of seconds past midnight?
A. SS
B. Sec
C. SSSS
D. SS.SS
C. SSSS
The phonetic representation of a character string is determined used what function?
A. SOUNDAS
B. SOUNDEX
C. PHONETIC
D. PHONEX
B. SOUNDEX
What argument indicates ‘minutes’ in the time element format argument?
MI
A date element cannot use which of the following arguments?
A.Round
B. To_Date
C. Months_between
D. AVG
D. AVG
What function is used to calculate the total amount stored in a numeric field for a group of records?
SUM
If the DISTINCT keyword is not included in the SUM function, what keyword is assumed?
ALL
T/F: When a SELECT statement includes WHERE, HAVING, and GROUP BY clauses, the GROUP BY clause is always evaluated first.
False
What functions allows you to enter data in a field for Null values?
A. NULLIF
B. NVL2
C. NVL
D. TO_CHAR
C. NVL
NVL(x, y) where y is the value to be substituted if x is NULL.
The _____ function returns a substring in the output.
A. SUBSTR
B. INSTR
C. CONCAT
D. TRANSLATE
A. SUBSTR
SUBSTR(c, p, 1)
where c is the string, p is the beginning of the extraction and 1 is the length of the output string.
The ____ function identifies the position of the search string and returns the numeric value of the position.
A. SUBSTR
B. INSTR
C. CONCAT
D. TRANSLATE
B. INSTR
INSTR(c, s, p, o)
where c is the string, s is the search string (what you’re searching for in the field), p is the search starting position, o is the occurrence of the string to identify.
The ____ clause is used to restrict the groups returned by the query.
HAVING
T/F: The WHERE clause can have group functions.
False
What expression allows you to use multiple grouping clauses?
Grouping sets
Group By ____ is used to calculate cumulative subtotals for the specified columns.
Rollup