Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please do the following in sql script. 17 Display the product ID and name for products whose total sales is less than 3 or total
please do the following in sql script.
17 Display the product ID and name for products whose total sales is less than 3 or total transactions is at most 1. Use a UNION. select 17; The view -- 18 Create a view named category_region over the category, region, store, salestranaction, includes, and product tables that summarizes total quantity sold by region and category. should have columns: categoryid, categoryname, regionid, regionname, totalsales create view 18; 19 Using the view created in 18, which region has the most sales for each category. you should get the result categoryname regionname totalsales Electronics Chicagoland 6 climbing Indiana 17 Camping Tristate 9 Footwear Tristate 20 Cycling Chicagoland 13 select 19; VENDOR VendorID VendorName PRODUCT ProductID ProductPrice ProductName VendorID (FK) CategoryID (FK) REGION RegionID Region Name CATEGORY CategoryID CategoryName STORE StoreID StoreZip RegionID (FK) INCLUDES ProductID (FK) TID (FK) Quantity SALES TRANSACTION TID TDate StoreID (FK) CustomerID (FK) CUSTOMER CustomerID CustomerName CustomerZipStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started