question archive Need help with SQL Sever 2012 1) Write a SELECT statement that joins the Categories table to the Products table andreturns these columns: CategoryName, ProductName, ListPrice

Need help with SQL Sever 2012 1) Write a SELECT statement that joins the Categories table to the Products table andreturns these columns: CategoryName, ProductName, ListPrice

Subject:Computer SciencePrice: Bought3

Need help with SQL Sever 2012
1) Write a SELECT statement that joins the Categories table to the Products table andreturns these columns: CategoryName, ProductName, ListPrice.Sort the result set by CategoryName and then by ProductName in ascending order.
2) Write a SELECT statement that joins the Customers table to the Addresses table andreturns these columns: FirstName, LastName, Line1, City, State, ZipCode.Return one row for each address for the customer with an email address ofallan.sherwood@yahoo.com.
3. Write a SELECT statement that joins the Customers table to the Addresses table andreturns these columns: FirstName, LastName, Line1, City, State, ZipCode.Return one row for each customer, but only return addresses that are the shippingaddress for a customer.
4. Write a SELECT statement that joins the Customers, Orders, OrderItems, andProducts tables. This statement should return these columns: LastName, FirstName,OrderDate, ProductName, ItemPrice, DiscountAmount, and Quantity.Use aliases for the tables.Sort the final result set by LastName, OrderDate, and ProductName.
5. Write a SELECT statement that returns the ProductName and ListPrice columnsfrom the Products table.Return one row for each product that has the same list price as another product. Hint:Use a self-join to check that the ProductID columns aren’t equal but the ListPricecolumn is equal.Sort the result set by ProductName.
6. Write a SELECT statement that returns these two columns:CategoryName The CategoryName column from the Categories tableProductID The ProductID column from the Products tableReturn one row for each category that has never been used. Hint: Use an outer joinand only return rows where the ProductID column contains a null value.
7. Use the UNION operator to generate a result set consisting of three columns fromthe Orders table:ShipStatus A calculated column that contains a value ofSHIPPED or NOT SHIPPEDOrderID The OrderID columnOrderDate The OrderDate columnIf the order has a value in the ShipDate column, the ShipStatus column shouldcontain a value of SHIPPED. Otherwise, it should contain a value of NOTSHIPPED.Sort the final result set by OrderDate.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions