You are on page 1of 5

Home My courses CS-350-LEC-1913T Week 7: Logical Condition Quiz 004



Question 1 Choose the letter of the correct answer based on table PARTS as
 Not yet shown below
answered
 Marked out of
1.00

Which of the following is the correct report listing the column


PARTNO, DESCRIPTION and WAREHOUSE. Get only that description
that does not ends with ‘ER’. Note that you have to merge the
said three columns, rename the merge column as “Parts
Record”. Below is the sample output for column.
Parts Record
AT94is the part number ofIRONwhich belong to warehouse3

SELECT (PARTNUM || ‘is the part number of’|| DESCRIPTION ||


‘which belongs to’ || WAREHOUSE FROM PARTS WHERE PARTNUM
NOT LIKE ‘%ER’;

SELECT (PARTNUM || ‘is the part number of’ ||DESCRIPTION ||


‘which belongs to’ || WAREHOUSE) FROM PARTS WHERE PARTNUM
NOT LIKE ‘ER%’;

SELECT (PARTNUM ‘is the part number of’ DESCRIPTION‘which


belongs to’WAREHOUSE) FROM PARTS WHERE PARTNUM NOT LIKE
‘%ER’;

SELECT (PARTNUM || ‘is the part number of’ ||DESCRIPTION ||


‘which belongs to’ || WAREHOUSE) FROM PARTS WHERE PARTNUM
LIKE ‘%ER’;

Question 2 Choose the letter of the correct answer based on table PARTS as
Not yet shown below
answered

Marked out of
1.00

Which of the following is the correct report showing all rows and
columns sort the description in ascending order.

SELECT * FROM PARTS ORDER BY DESCRIPTION DESC;

SELECT * FROM PARTS ORDER BY DESCRIPTION;

SELECT * FROM PARTS ORDER BY DESCRIPTION ASC;

SELECT * FROM PARTS ORDER BY DESC;


Question 3 Choose the letter of the correct answer based on table PARTS as
Not yet shown below
answered

Marked out of
 1.00


Which of the following is the correct report listing only the
 column DESCRIPTION, WAREHOUSE, CLASS and PRICE of all parts
where the description contains keyword ‘SHE’.

SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM PARTS
WHERE DESCRIPTION LIKE ‘%SHE%’;

SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM PARTS
WHERE DESCRIPTION LIKE ‘SHE%’;

SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM PARTS


WHERE DESCRIPTION LIKE ‘%SHE’;

SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM PARTS


WHERE DESCRIPTION LIKE ‘SHE’;

Question 4 Choose the letter of the correct answer based on table PARTS as
Not yet shown below
answered

Marked out of
1.00

Which of the following is the correct report that will display the
distinct value for CLASS and WAREHOUSE limit the rows by
getting only the parts under WAREHOUSE 3?

SELECT CLASS, WAREHOUSE FROM PARTS WHERE WAREHOUSE =


3;

SELECT CLASS, WAREHOUSE FROM PARTS WHERE WAREHOUSE =


‘3’;

SELECT CLASS, WAREHOUSE FROM PARTS WHERE WAREHOUSE =


=3;

SELECT CLASS, WAREHOUSE =3 FROM PARTS WHERE WAREHOUSE


= 3;
Question 5 Given the output below. Which of the following is the correct
Not yet PL/SQL to be used?
answered

Marked out of
 1.00


Select one:
 a. SELECT DESCRIPTION, ONHAND, CLASS
FROM PARTS

 WHERE CLASS = ‘AP’ OR DESCRIPTION LIKE ‘__S%’;


b. SELECT DESCRIPTION, ONHAND, CLASS
FROM PARTS

WHERE CLASS = ‘AP’ AND DESCRIPTION LIKE ‘__S%’;


c. SELECT DESCRIPTION, ONHAND, CLASS
FROM PARTS
WHERE CLASS = ‘AP’ OR ONHAND BETWEEEN 8 AND 12

d. SELECT DESCRIPTION, ONHAND, CLASS


FROM PARTS
WHERE CLASS = ‘AP’ OR ONHAND >=8;

Clear my choice

Question 6 Choose the letter of the correct answer based on table PARTS as
Not yet shown below
answered

Marked out of
1.00

Which of the following is the correct report listing only the


column DESCRIPTION, PARTNUM, CLASS and PRICE of all parts
where the description fourth letter starting from the first is equal
to ‘D’.

SELECT DESCRIPTION, PARTNUM, CLASS, PRICES FROM PARTS


WHERE DESCRIPTION LIKE ‘___D%’;

SELECT DESCRIPTION, PARTNUM, CLASS, PRICES FROM PARTS


WHERE DESCRIPTION LIKE ‘%D___’;

SELECT DESCRIPTION, PARTNUM, CLASS, PRICES FROM PARTS


WHERE DESCRIPTION LIKE ‘D%’;

SELECT DESCRIPTION, PARTNUM, CLASS, PRICES FROM PARTS


WHERE DESCRIPTION LIKE ‘%D’;
Question 7 Given the output below. Which of the following is the correct
Not yet PL/SQL to be used?
answered

Marked out of
 1.00

 Select one:
a. SELECT WAREHOUSE, CLASS FROM PARTS WHERE CLASS IN
 (‘AP’,’SG’,’HW’);

b. SELECT DISTINCT WAREHOUSE, CLASS FROM PARTS;



c. SELECT DISTINCT WAREHOUSE, CLASS FROM PARTS WHERE
WAREHOUSE >=1;

d. SELECT WAREHOUSE, CLASS FROM PARTS;
 Clear my choice

Question 8 Given the output below. Which of the following is the correct
Not yet PL/SQL to be used?
answered

Marked out of
1.00

Select one:
a. SELECT DESCRIPTION, ONHAND, CLASS
FROM PARTS
WHERE DESCRIPTION LIKE ‘%L’;

b. SELECT DESCRIPTION, ONHAND, CLASS


FROM PARTS

WHERE ONHAND >=9;

c. SELECT DESCRIPTION, ONHAND, CLASS


FROM PARTS
WHERE CLASS IN (‘HW’,’SG’);

d. SELECT DESCRIPTION, ONHAND, CLASS


FROM PARTS

WHERE DESCRIPTION LIKE ‘%L%’;

Clear my choice

Question 9 This is used to perform wildcard searches of valid search string


Not yet values.
answered

Marked out of Select one:


1.00
a. Like

b. Comparison

c. IN

d. Between

Clear my choice
Question 10 True/False. This symbol % denotes zero or many characters.
Not yet
answered
Answer: True
Marked out of
 1.00

Stay in touch
AMA EDUCATION SYSTEM
 https://blended.amauonline.com/helpdesk

You might also like