Computer Science, asked by rishi270691, 5 hours ago

Write a query to display (product_class_desc, product_id, product_desc,
product_quantity_avail ) and Show inventory status of products as below as per their
available quantity:
a. For Electronics and Computer categories, if available quantity is <= 10, show 'Low
stock', 11 <= qty <= 30, show 'In stock', >= 31, show 'Enough stock'
b. For Stationery and Clothes categories, if qty <= 20, show 'Low stock', 21 <= qty <=
80, show 'In stock', >= 81, show 'Enough stock'
c. Rest of the categories, if qty <= 15 – 'Low Stock', 16 <= qty <= 50 – 'In Stock', >= 51 –
'Enough stock'
For all categories, if available quantity is 0, show 'Out of
stock'.
Hint: Use case statement.

Answers

Answered by samarthkamate
0

Answer:

Describe the process by which a bill becomes Law?

Answered by Jasleen0599
4

We can utilize were, case, and combine. In the event that you are utilizing a case condition, you need to revamp that is where explanation if that is the expectation.

For example Select product _ class _ desc, product _ id, product _ desc, situation when amount <= 10 and class = "Gadgets" and afterward "low stock" when xx - - notice every one of your conditions here individually else ... condition for different classifications end as quantity _ status

from table_xx internal join table_yy on product_id = productid

Attachments:
Similar questions