Question: 1 . Write a SELECT statement that joins the Categories table to the Products table and returns these columns: category _ name, product _ name,
Write a SELECT statement that joins the Categories table to the Products table and
returns these columns: categoryname, productname, listprice.
Sort the result set by the categoryname column and then by the productname column in
ascending sequence.
Write a SELECT statement that joins the Customers table to the Addresses table and
returns these columns: firstname, lastname, line city, state, zipcode.
Return one row for each address for the customer with an email address of
allan.sherwood@yahoo.com
Sort the result set by the zipcode column in ascending sequence.
Write a SELECT statement that joins the Customers table to the Addresses table and
returns these columns: firstname, lastname, line city, state, zipcode.
Return one row for each customer, but only return addresses that are the shipping address
for a customer.
Sort the result set by the zipcode column in ascending sequence.
Write a SELECT statement that joins the Customers, Orders, OrderItems, and
Products 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 the lastname, orderdate, and productname columns.
Use the UNION operator to generate a result set consisting of three columns from the
Orders table:
shipstatus A calculated column that contains a value of
SHIPPED or NOT SHIPPED
orderid The orderid column
orderdate The orderdate column
If the order has a value in the shipdate column, the shipstatus column should contain a
value of SHIPPED. Otherwise, it should contain a value of NOT SHIPPED.
Sort the final result set by the orderdate column.
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
