1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Eduardwww [97]
3 years ago
5

Write a SELECT statement that joins the Categories table to the Products table and returns these columns: category_name, product

_name, list_price. Sort the result set by category_name and then by product_name, both in ascending sequence. (...feel free to use table alias names to make your SQL statements easier to code and read...) 10 records should display in your result Write a SELECT statement that joins the Customers, Orders, order_items, and Products tables. This statement should return these columns: last_name, first_name, order_date, product_name, item_price, discount_amount, and quantity. Use aliases for the tables. Sort the final result set by last_name, order_date, and product_name. Write a SELECT statement that returns these two columns: category_name The category_name column from the Categories table product_id The product_id column from the Products table Return one row for each category that has never been used. Use table alias names. Use the UNION operator to generate a result set consisting of three columns from the Orders table: The 3 columns will be: If the order has a value in the ship date column, the ship status column should contain a value of SHIPPED. Otherwise, it should contain a value of NOT SHIPPED.
Computers and Technology
1 answer:
Sphinxa [80]3 years ago
3 0

Answer & Explanation:

1) Query:

SELECT Product_Name, Category_Name, List_Price

FROM Products AS P JOIN Categories AS C

ON C.Category_ID = P.Category_ID

ORDER BY Category_Name, Product_Name ASC;

2) Query:

SELECT C.Last_Name, C.First_Name, Order_Date, P.Product_Name, Item_Price, Discount_Amount, Quantity

FROM Customers AS C JOIN Orders AS O

ON C.Customer_ID = O.Customer_ID

JOIN Order_Items AS OI

ON O.Order_ID = OI.Order_ID

JOIN Products AS P

ON OI.Product_ID = P.Product_ID

ORDER BY Last_Name, Order_Date, Product_Name;

3) Query:

SELECT Category_Name, Product_ID

FROM Categories LEFT JOIN Products

ON Categories.Category_ID = Products.Category_ID

WHERE Product_ID IS NULL;

4) Query:

SELECT 'SHIPPED' AS Ship_Status, Order_Id, Order_Date

FROM Orders

WHERE Ship_Date IS NOT NULL

UNION

SELECT 'NOT SHIPPED' AS Ship_Status, Order_ID, Order_Date

FROM Orders

WHERE Ship_Date IS NULL

ORDER BY Order_Date;

You might be interested in
A friend emails a presentation to isabella to view. what kind of change can she make?​
fiasKO [112]

Answer:

She can enable editing. She can change the view.

Explanation:

6 0
3 years ago
To recover a deleted document, what would you choose in the Info window?
kiruha [24]
Retrive you can restart your computer press f8 it will takr you to a menu were you can choos recover lost files then go from there
6 0
3 years ago
..........................................
Scilla [17]

Answer:

jhhgvjgfhvbnbjvjn

Explanation:

7 0
2 years ago
Read 2 more answers
Who made bars no jutsu
poizon [28]

Answer:

he made it

Explanation: Louis [Cap]one

8 0
3 years ago
Which function in excel should be used to display a value based on a comparison
olga_2 [115]
IF is a Comparison Function 
4 0
3 years ago
Other questions:
  • Which of the following statements is false? a. Classes (and their objects) encapsulate, i.e., encase, their attributes and metho
    15·1 answer
  • What is a DreamScape?<br> Explain <br> and give example (if you want)
    10·1 answer
  • Define the proposition in symbols using: p: The weather is bad. q: The trip is cancelled. r: The trip is delayed. Proposition in
    7·1 answer
  • The company where Derek works has tasked him with setting up and securing a SOHO router. He wants to make sure the wireless netw
    11·1 answer
  • According to the textbook, the definition of transition is
    13·1 answer
  • Jack used primarily web sources for his informative speech about gun control. however, his over-reliance on the web site sponsor
    11·1 answer
  • What is known as networking in the IT field?
    8·1 answer
  • In terms of CPU scheduling metrics, __________ is the time at which the job completes minus the time at which the job arrived in
    10·1 answer
  • Which image file format is the best format to use for photographs on the Web
    15·1 answer
  • Ken has discovered that a vice president of his company has been using his computer to send data about a new product to a compet
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!