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
Based on the following passage on construction technology during the Middle Ages, why might a worker not be allowed to join a gu
olya-2409 [2.1K]

Answer:

He was not born into a family of skilled laborers

Explanation:

6 0
3 years ago
When did economies begin?
Pavlova-9 [17]
They began in ancient times the babylons started trading
6 0
3 years ago
Read 2 more answers
Lisa granted the CREATE TABLE privilege WITH ADMIN OPTION to Sharon. Sharon granted the privilege to Bob. If Lisa’s privileges a
GuDViN [60]

Answer:

D

Explanation:

As it's not fair if they all lose there privileges

4 0
3 years ago
Which strategies for effective presentations is Ian using in his opening? Check all that apply.
Fofino [41]

Answer:

A. using a hook in his opening

B.  detailing the speech’s objectives

E. letting his audience know what to expect

Explanation:

Opening his speech using a quotation is a strategy of using a narrative hook, or simply hook, by Ian. Giving a grand and enticing opening is what makes an audience to pay attention and listen to what the speaker has to say in his speech. So, first strategy used by Ian is using a hook in his opening.

Another strategy used by Ian is giving objective details of his speech. By outlining what he will be covering in his speech, Ian is letting his audience know what to expect from the speaker and his speech, and also gave details of his speech.

So, option A, B, and E are correct.

5 0
3 years ago
Read 2 more answers
Please complete the spelling please tell fast.​
LenaWriter [7]

Answer:

spacebar and number i think

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • 1. JAVA Create one method to do the following expressions. Given the following declarations, what is the result of each of the e
    13·1 answer
  • _______________ is the term for the convergence of real-time and non-real-time communications services such as telephony, instan
    11·1 answer
  • What is this I’m so lost
    9·1 answer
  • What is the impact of information technology in your daily life?
    12·1 answer
  • What port is typically reserved and utilized by the Secure Hypertext Transfer Protocol to create a secure connection to a Web se
    13·1 answer
  • (TCO C) When a remote user attempts to dial in to the network, the network access server (NAS) queries the TACACS+ server. If th
    14·1 answer
  • What is the term for the era created by the digital revolution?<br>​
    13·1 answer
  • Uinjsiodj9fijsdiokjdwe0okakj09dw9j09jw09
    9·2 answers
  • . In this project, how many times will the [Drive] block be repeated?
    15·1 answer
  • The impact of the destruction of train station on the budget of the minister of finance
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!