Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Display all columns from the Addresses table for those addresses that are located in New Jersey and have a value in the Line2 column
Display all columns from the Addresses table for those addresses that are located in New Jersey and have a value in the Line2 column (hint: not a null). Order the results by ZinCode in ascending order. Problem #2: Display all columns from the Products table for those products where the ProductName column includes the keyword "drum" and does not include the keyword "ludwig". Order the results by ProductID in ascending order. Problem # 3: Display the EMailAddress, column from the Customers table along with the # of orders associated with the customer (use an alias of # of orders') and the total orders value (use an alias of "Total Orders Value) for the customer. Only show those customers where the # of orders value is greater than one. Order the results in descending order by the # of orders. Hint: [order value = (temprice Quantity)-DiscountAmount]. Problem #4: Display the CategoryID and CategoryName columns from the Categories table that do not have any associated Products. **MUST USE A JOIN. Problem #5: Display the CategoryID and CategoryName columns from the Categories table that do not have any associated Products. **MUST USE A SUBQUERY. Problem #6: Display the EMailAddress column from the Customers table and all associated CategoryName's from the Category table. Order the results in ascending order by EMailAddress and CategoryName. Hint: You will be joining 5 tables
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Problem 1 SELECT FROM Addresses WHERE State NJ AND Line2 IS NOT NULL ORDER BY ZipCode ASC Problem 2 ...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