Take Test: 2. Chapter 10 Quiz - Click here Question 1 Contents of ORDERS table N
ID: 3580151 • Letter: T
Question
Take Test: 2. Chapter 10 Quiz - Click here
Question 1
Contents of ORDERS table
Note: Column names are truncated as follows: SH = SHIPSTATE and SHIPZ = SHIPZIP.
Based upon the contents of the ORDERS table, which of the following SQL statements will display the number of days between the date an order was placed and the date it was shipped?
a.
SELECT order#, MONTHS_BETWEEN(shipdate-orderdate, '99') FROM orders
WHERE shipdate IS NOT NULL;
b.
SELECT order#, ADD_MONTHS(shipdate-orderdate, '99') FROM orders
WHERE shipdate IS NOT NULL;
c.
SELECT order#, DAYS_BETWEEN(shipdate-orderdate, '99') FROM orders
WHERE shipdate IS NOT NULL;
d.
SELECT order#, TO_CHAR(shipdate-orderdate, '99') FROM orders
WHERE shipdate IS NOT NULL;
0.1 points
Question 2
Contents of ORDERS table
Note: Column names are truncated as follows: SH = SHIPSTATE and SHIPZ = SHIPZIP.
Based upon the contents of the ORDERS table, which of the following SQL statements will display only those orders shipped to the zip code zone that begins with 323?
a.
SELECT order#, SUBSTR(shipzip, 1, 323)
FROM orders
WHERE shipzip = 323;
b.
SELECT order#
FROM orders
WHERE shipzip = SUBSTR(shipzip, 1, 323);
c.
SELECT order#
FROM orders
WHERE SUBSTR(shipzip, 1, 3) = 323;
d.
SELECT order#, SUBSTR(shipzip, 1, 323)
FROM orders;
0.1 points
Question 3
Contents of ORDERS table
Note: Column names are truncated as follows: SH = SHIPSTATE and SHIPZ = SHIPZIP.
Based upon the contents of the ORDERS table, which of the following SQL statements will display the ship date for order 1006 as April 2, 2002?
a.
SELECT order#, TO_CHAR(shipdate, 'Month DY, YYYY')
FROM orders;
b.
SELECT order#, TO_DATE(shipdate, 'Month DY, YYYY')
FROM orders;
c.
SELECT order#, TO_CHAR(shipdate, 'Month DD, YYYY')
FROM orders;
d.
SELECT order#, TO_DATE(shipdate, 'Month DD, YYYY')
FROM orders;
0.1 points
Question 4
The TO_CHAR function can be used to format what types of data?
a.
numeric
b.
date
c.
no formatting can be performed
d.
numeric and date
0.1 points
Question 5
The phonetic representation of a character string can be determined using the ____ function.
a.
PHONETIC
b.
SOUNDINDEX
c.
SOUND
d.
SOUNDEX
0.1 points
Question 6
What is the maximum number of columns or character strings that can be combined through a single CONCAT function?
a.
two
b.
three
c.
four
d.
eight
0.1 points
Question 7
When functions are nested, the ____ function is solved last.
a.
outer
b.
multiple-row
c.
inner
d.
single-row
0.1 points
Question 8
Which of the following can be used to replace a specific set of characters with another set of characters?
a.
none of the above
b.
FNDRPLCE
c.
SUBSTR
d.
REPLACE
0.1 points
Question 9
Which of the following format argument elements indicates that the name of the day of the week for the specified date should be displayed?
a.
D
b.
DAY
c.
DDD
d.
DD
0.1 points
Question 10
Which of the following format argument elements will display the number of seconds past midnight?
a.
SSSS
b.
MI:SS
c.
SS
d.
MI
0.1 points
Question 11
Which of the following format elements will display 1:00 p.m. as 13?
a.
HH24
b.
HR
c.
24
d.
HH
0.1 points
Question 12
Which of the following format elements will display insignificant leading zeros?
a.
0009999
b.
99.999
c.
$999
d.
9,999.990
0.1 points
Question 13
Which of the following functions can be used to substitute another value for a NULL value during calculations?
a.
NULLVAL
b.
NLV
c.
NULVAL
d.
NVL
0.1 points
Question 14
Which of the following functions is used to determine the number of months between two date values?
a.
MNTH_BETWEEN
b.
MONTH_BETWEEN
c.
MONTHS_BETWEEN
d.
MTH_BETWEEN
0.1 points
Question 15
Which of the following functions will truncate a numeric value to a specific position?
a.
TRUNCATE
b.
none of the above
c.
TRUND
d.
TRUNC
a.
SELECT order#, MONTHS_BETWEEN(shipdate-orderdate, '99') FROM orders
WHERE shipdate IS NOT NULL;
b.
SELECT order#, ADD_MONTHS(shipdate-orderdate, '99') FROM orders
WHERE shipdate IS NOT NULL;
c.
SELECT order#, DAYS_BETWEEN(shipdate-orderdate, '99') FROM orders
WHERE shipdate IS NOT NULL;
d.
SELECT order#, TO_CHAR(shipdate-orderdate, '99') FROM orders
WHERE shipdate IS NOT NULL;
Explanation / Answer
1.
SELECT order#, TO_CHAR(shipdate-orderdate, '99') FROM orders
WHERE shipdate IS NOT NULL;
Option d is correct choice.
4.
date
Option b is correct choice.
5
soundex
Option d is correct choice.
6
two
Option a is correct choic
7
multiple-row
Option b is correct choice.
8
replace
Option c is correct choice.
9
DAY
Option b is correct choice.
10.
SSSS
Option a is correct choice.
11.
HH24
Option a is correct choice.
12.
0009999
Option a is correct choice.
13.
NVL
Option d is correct choice.
14
months-between
Option c is correct choice.
15
truncate
Option a is correct choice.
4.
date
Option b is correct choice.
5
soundex
Option d is correct choice.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.