Question: /* Query 4. Find products that satisfy BOTH conditions below: (a) Its unit price must NOT below $22. (b) Its category ID is 4 or

/* Query 4.

Find products that satisfy BOTH conditions below:

(a) Its unit price must NOT below $22.

(b) Its category ID is 4 or 7 or 8. If its category ID is 1 or 3, then it

must

have at least 40 units in stock.

Display their ProductID, UnitPrice, CategoryID, and UnitsInStock. The

output should

be sorted by CategoryID in A -> Z order (i.e., from smallest to largest).

For those

with the same CategoryID, the one with the highest UnitPrice should be

displayed first.

Hint 1: a compound condition with AND, OR, NOT.

Hint 2: correct output has 16 products.

*/

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!