Week 12 Flashcards

Selected single row functions and Group functions

1
Q

T/F: The Round function can be used to truncate numeric data.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the format argument element that displays the number of seconds past midnight?

A. SS
B. Sec
C. SSSS
D. SS.SS

A

C. SSSS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The phonetic representation of a character string is determined used what function?

A. SOUNDAS
B. SOUNDEX
C. PHONETIC
D. PHONEX

A

B. SOUNDEX

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What argument indicates ‘minutes’ in the time element format argument?

A

MI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A date element cannot use which of the following arguments?

A.Round
B. To_Date
C. Months_between
D. AVG

A

D. AVG

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What function is used to calculate the total amount stored in a numeric field for a group of records?

A

SUM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

If the DISTINCT keyword is not included in the SUM function, what keyword is assumed?

A

ALL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

T/F: When a SELECT statement includes WHERE, HAVING, and GROUP BY clauses, the GROUP BY clause is always evaluated first.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What functions allows you to enter data in a field for Null values?

A. NULLIF
B. NVL2
C. NVL
D. TO_CHAR

A

C. NVL

NVL(x, y) where y is the value to be substituted if x is NULL.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The _____ function returns a substring in the output.

A. SUBSTR
B. INSTR
C. CONCAT
D. TRANSLATE

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The ____ clause is used to restrict the groups returned by the query.

A

HAVING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

T/F: The WHERE clause can have group functions.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What expression allows you to use multiple grouping clauses?

A

Grouping sets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Group By ____ is used to calculate cumulative subtotals for the specified columns.

A

Rollup

How well did you know this?
1
Not at all
2
3
4
5
Perfectly