0% found this document useful (0 votes)
204 views5 pages

DBMS - Quiz 004 - 8 PDF

This document contains a 10 question quiz on SQL queries and logical conditions. The questions test skills such as selecting columns and rows that meet certain criteria, using wildcards, sorting results, and identifying the purpose of SQL operators. Correct answers are chosen from multiple choice options provided with each question.

Uploaded by

jikjik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
204 views5 pages

DBMS - Quiz 004 - 8 PDF

This document contains a 10 question quiz on SQL queries and logical conditions. The questions test skills such as selecting columns and rows that meet certain criteria, using wildcards, sorting results, and identifying the purpose of SQL operators. Correct answers are chosen from multiple choice options provided with each question.

Uploaded by

jikjik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy