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 __________ is the column of data in a database that is used as the basis for arranging data.
Llana [10]
The answer is sort key.  A Sort Key is the column of data in a database that is used as the basis for arranging data. Iy is also used for rearranging data in the column.  An Operational Database is used to collect, modify, and maintain data on a daily basis.
8 0
3 years ago
Read 2 more answers
What are the steps for creating a bookmark? 1. Place the insertion point where the bookmark should appear. 2. Click the tab. 3.
Paladinen [302]

Answer:

2. Insert

3. Links

4. Add

6. Advanced

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

A website refers to the collective name used to describe series of web pages linked together with the same domain name.

On the other hand, a webpage is the individual HTML document (single page) that makes up a website with a unique uniform resource locator (URL).

A bookmark can be defined as a placeholder or saved shortcut for a webpage and for future reference. Thus, it avails an end user the ability to quickly access a bookmarked webpage by automatically directing the web browser to the webpage.

Basically, the steps for creating a bookmark are;

1. The insertion point of the webpage should be placed at the point where the bookmark should appear.

2. Click the "INSERT" tab.

3. In the "LINKS" group, click "Bookmark"

4. When a dialog box opens, the bookmark should be named with a specific title, and then click "ADD"

5. To see bookmarks within the HTML document, you should go to Backstage view and click on "Options"

6. In ADVANCED, select Show Bookmarks to have them appear as a locked cursor within the HTML document.

6 0
3 years ago
Write a SELECT statement that joins the Categories table to the Products table and returns these columns: category_name, product
Sphinxa [80]

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;

3 0
3 years ago
What is an audit trail?
rewona [7]

Answer:

poop

Explanation:

poop

3 0
3 years ago
Read 2 more answers
Write a program that asks the user to input a set of floating-point values. When the user enters a value that is not a number, g
Lady_Fox [76]

Answer:

Check the explanation

Explanation:

// include the necessary packages

import java.io.*;

import java.util.*;

// Declare a class

public class DataReader

{

// Start the main method.

public static void main(String[] args)

{

// create the object of scanner class.

Scanner scan = new Scanner(System.in);

// Declare variables.

boolean done = false;

boolean done1 = false;

float sum = 0;

double v;

int count = 0;

// start the while loop

while (!done1)

{

// start the do while loop

do

{

// prompt the user to enter the value.

System.out.println("Value:");

// start the try block

try

{

// input number

v = scan.nextDouble();

// calculate the sum

sum = (float) (sum + v);

}

// start the catch block

catch (Exception nfe)

{

// input a character variable(\n)

String ch = scan.nextLine();

// display the statement.

System.out.println(

"Input Error. Try again.");

// count the value.

count++;

break;

}

}

// end do while loop

while (!done);

// Check whether the value of count

// greater than 2 or not.

if (count >= 2)

{

// display the statement on console.

System.out.println("Sum: " + sum);

done1 = true;

}

}

}

}

Sample Output:

Value:

12

Value:

12

Value:

ten

Input Error. Try again.

Value:

5

Value:

nine

Input Error. Try again.

Sum: 29.0

3 0
3 years ago
Read 2 more answers
Other questions:
  • A Color class has three int color component instance variables: red, green, and blue. Write a toString method for this class. It
    13·1 answer
  • Which functions are performed by server-side code??​
    10·1 answer
  • A(n) ________ address is a temporary ip address assigned from an available pool of ip addresses.
    12·1 answer
  • A server of service is responsible for sending the contents of cengage.com to your browser when you type cengage.com into the lo
    12·1 answer
  • If you define a destructor, are you required to define an operator '=' and a copy constructor?
    9·1 answer
  • Which of the following is the best example of an installation issue?
    6·2 answers
  • A monopoly is a market that has few competing businesses. many sellers of the same item. many sellers of a variety of products.
    8·2 answers
  • How do I create a simple percentage function to gather a score for a quiz in PHP?
    14·1 answer
  • Consider the following code segment.
    10·1 answer
  • Question 8 A data analyst is working with a data frame named stores. It has separate columns for city (city) and state (state).
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!