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

QUESTION 8 The following two tables are part of my STORE database. The first tab

ID: 3842629 • Letter: Q

Question

QUESTION 8

The following two tables are part of my STORE database. The first table is 'products' with a primary key of productId, a foreign key of categoryId, a description of the product, the amount that the store has in inventory, and the price per item. The second table is 'categories' with a primary key of categoryId and a category type. Which of the following queries returns exactly TWO records?

productId

categoryId

description

inventory

price

1

2

plastic cups plastic

50

1.99

2

2

9 inch plates pactiv

20

5.99

3

2

7 inch plates pactiv

30

5.50

4

2

Bounty paper towels

30

11.99

5

3

Mr. Clean 24 oz

22

3.49

6

3

Fantastic Spray

12

2.89

categoryId

type

1

produce

2

paperware

3

cleaning supplies

4

cereal

select * from products where price < 3.00

SELECT productId FROM products WHERE description LIKE %plastic%

SELECT * FROM products WHERE inventory >= 30 OR price > 5.00

SELECT products.description FROM products, categories where products.categoryId = categories.categoryId AND categories.type LIKE c%

SELECT * FROM products WHERE inventory >= 30 AND price > 5.00  

productId

categoryId

description

inventory

price

1

2

plastic cups plastic

50

1.99

2

2

9 inch plates pactiv

20

5.99

3

2

7 inch plates pactiv

30

5.50

4

2

Bounty paper towels

30

11.99

5

3

Mr. Clean 24 oz

22

3.49

6

3

Fantastic Spray

12

2.89

Explanation / Answer

select * from products where price < 3.00
this will return

productId

categoryId

description

inventory

price

1

2

plastic cups plastic

50

1.99

6

3

Fantastic Spray

12

2.89

SELECT * FROM products WHERE inventory >= 30 AND price > 5.00
this will return

2

2

9 inch plates pactiv

20

5.99

3

2

7 inch plates pactiv

30

5.50

productId

categoryId

description

inventory

price

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote