Question: Using SQL CASE Expressions and DML Operations and given the database description below: Tb _ Supplier ( Supp _ ID , Name, City ) Tb
Using SQL CASE Expressions and DML Operations and given the database description below:
TbSupplierSuppID Name, City
TbConsumerConID Name, City
TbProductProdID Name, MU
TbOffersSuppID ProdID Quantity, Price
TbRequestsConID ProdID Quantity, Price
TbTransactionsTID SuppID ConID ProdID Quantity, Price
Solve and test the following queries:
Supplier cities and amount of auto, trucks, TV and airplanes offered in each city?
For each product list the total quantities purchased in the of the following cities:
Wausau, Chicago, Madison, New York? solve in versions: using CASE
expressions, using correlated subqueries, using the PIVOT function
Supplierconsumer pairs having at least one transaction and values for oil,
orange, and TV traded between the two?
Suppliers located in Wausau or Chicago or having less than offers or not having
offers for trucks?
For each product list quantity sold by suppliers in Madison to consumers in
Chicago versus quantity sold by suppliers in Chicago to consumers in Madison
result columns will be: product name, quantity MadisonChicago, quantity
ChicagoMadison
Increase by the price of all offers made by suppliers located in Chicago.
Increase by the price of all offers for products offered by less than
suppliers.
Modify requests prices as follows: increase by the request prices for
computers in cities where there is only one computer supplier, increase by
requests prices for TV and auto and reduce by request prices for oil if
request is made by consumer in Chicago.
Increase by the offer price of all products for which demand is higher than
the offer the quantity requested is higher than the quantity offered
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
