Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Take Test: 2. Chapter 8 Quiz - Click Here Question 1 Which of the following clau

ID: 3578950 • Letter: T

Question

Take Test: 2. Chapter 8 Quiz - Click Here

Question 1

Which of the following clauses is used to indicate a particular sort sequence for presenting query results?

a.

WHERE

b.

SELECT

c.

SORT BY

d.

ORDER BY

0.1 points

Question 2

A(n) ____ is used to indicate how data should relate to a given search condition.

a.

search pattern

b.

criteria

c.

logical operator

d.

comparison operator

0.1 points

Question 3

Contents of BOOKS table

Based upon the contents of the BOOKS table in the accompanying figure, which of the following SQL statements will retrieve all books published by the publisher assigned Pubid 1?

a.

SELECT * FROM books WHERE pubid LIKE "1";

b.

SELECT * FROM books WHERE pubid = 1;

c.

both a and b

d.

SELECT * FROM books WHERE pubid > 1;

0.1 points

Question 4

Contents of BOOKS table

Based upon the contents of the BOOKS table in the accompanying figure, which of the following queries will retrieve all book titles that are in the Business or Computer category and have a retail price of more than $35.00?

a.

SELECT title FROM books
WHERE category = 'BUSINESS' OR category ='COMPUTER' AND retail >35;

b.

SELECT title FROM books
WHERE category = 'BUSINESS' OR 'COMPUTER' AND retail >35;

c.

SELECT title FROM books
WHERE (category = 'BUSINESS' OR category ='COMPUTER' ) AND retail >35;

d.

SELECT title FROM books
WHERE category = 'BUSINESS' OR category ='COMPUTER' AND (retail >35);

0.1 points

Question 5

Contents of BOOKS table

Based upon the contents of the BOOKS table in the accompanying figure, which of the following queries will return all books that cost at least $25.00?

a.

SELECT * FROM books
WHERE cost >= $25.00;

b.

none of the above

c.

SELECT * FROM books
WHERE cost > $25.00;

d.

SELECT * FROM books
WHERE cost >= 25.00;

0.1 points

Question 6

Contents of BOOKS table

Based upon the contents of the BOOKS table in the accompanying figure, which of the following queries will list all books stored in the BOOKS table with a retail price of more than $38 sorted by retail price?

a.

SELECT * FROM books WHERE retail >38 ORDERED BY retail;

b.

SELECT * FROM books WHERE retail >38 SORTED BY retail;

c.

SELECT * FROM books WHERE retail >38 ORDER BY retail;

d.

SELECT * FROM books WHERE retail >38 SORT BY retail;

0.1 points

Question 7

Contents of the ORDERS table

Based upon the contents of the ORDERS table in the accompanying figure, which of the following SQL statements will display how long it took to ship order # 1007 (based upon when the order was originally placed)?

a.

SELECT order#, shipdate-orderdate FROM orders WHERE order# LIKE '1_7%';

b.

SELECT order#, shipdate-orderdate FROM orders WHERE order# = 1_7%;

c.

SELECT order#, shipdate-orderdate FROM orders WHERE order# LIKE 1_7%;

d.

SELECT order#, shipdate-orderdate FROM orders WHERE order# = 1007;

0.1 points

Question 8

Contents of the ORDERS table

Based upon the contents of the ORDERS table in the accompanying figure, which of the following queries will return all orders shipped within three days after the order was received?

a.

SELECT * FROM orders WHERE NOT shipdate-orderdate => 3;

b.

SELECT * FROM orders WHERE shipdate-orderdate =< 3;

c.

SELECT * FROM orders WHERE shipdate-orderdate <= 3;

d.

SELECT * FROM orders WHERE shipdate-orderdate >= 3;

0.1 points

Question 9

Contents of the ORDERS table

Based upon the contents of the ORDERS table in the accompanying figure, which of the following SELECT statements will retrieve all orders contained in the ORDERS table that have not yet been shipped to the customer?

a.

none of the above

b.

SELECT * FROM orders WHERE shipdate = NULL;

c.

SELECT * FROM orders WHERE shipdate LIKE 'NULL';

d.

SELECT * FROM orders WHERE shipdate > NULL;

0.1 points

Question 10

Contents of the ORDERS table

Based upon the contents of the ORDERS table in the accompanying figure, which of the following SQL statements will display all orders contained in the ORDERS table that have been shipped to the customer?

a.

SELECT * FROM orders WHERE shipdate = 'NOT NULL';

b.

SELECT * FROM orders WHERE shipdate = NOT NULL;

c.

SELECT * FROM orders WHERE shipdate IS NOT NULL;

d.

SELECT * FROM orders WHERE shipdate IS NULL;

0.1 points

Question 11

If there is an exact match between the data used for a primary sort, a(n) ____ can be used to determine the sequence used to display the data.

a.

secondary sort

b.

alternate sort

c.

alternative sort

d.

supplemental sort

0.1 points

Question 12

The process of retrieving only certain rows based upon a specified condition is known as ____.

a.

selection

b.

projection

c.

derivation

d.

retrieval

0.1 points

Question 13

When sorting the results in ascending order, which of the following values will be presented last in the output?

a.

numeric

b.

date

c.

NULL

d.

character

0.1 points

Question 14

When sorting the results in ascending order, which of the following values will be presented first in the output?

a.

numeric

b.

date

c.

NULL

d.

character

0.1 points

Question 15

When the WHERE clause contains multiple types of operators, which of the following is resolved first?

a.

logical operators

b.

union operators

c.

comparison operators

d.

arithmetic operations

0.1 points

Click Save and Submit to save and submit. Click Save All Answers to save all answers

a.

WHERE

b.

SELECT

c.

SORT BY

d.

ORDER BY

Explanation / Answer

Question 1: d. order by

Question 2: b) creteria

Question 3: b) select * from books where pubid =1;

Question 4: a) Select title from books where category ='Business' or category = 'Computer' and retail >35;

Question 5: a) select * from books where cost >=25.00;

Question 6: c) select * from books where retail >38 order by retail;

Question 7: d) select order#,shipdate-orderdate from orders where order# = 1007;

Question 8: c)SELECT * FROM orders WHERE shipdate-orderdate <= 3;

Question 9: a)none of the above

Question 10: c)SELECT * FROM orders WHERE shipdate IS NOT NULL;

Question 11: a)secondary sort

Question 12: a)selection

Question 13: c)Null

Question 14: a) numeric

Question 15: c)comparison operator