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
Write a program that asks for a password and then verifies that it meets the stated criteria. • If the password meets the criter
inessss [21]

Missing Details in Question

The password criteria are not stated. For this program, I'll assume the following

  • Password must contain at least 1 capital letter
  • Password must contain at least 1 small letter
  • Password must contain at least 1 digit
  • Password must be at least 8 characters

See Attachment for Source File "MyName-Hwrk10A.cpp"

Answer:

// Comment explains difficult lines

#include<iostream>

#include<cstring>

#include<cctype>

using namespace std;

int main()

{

//Enter your name here

int k,l,m;

/*

Integer variables k,l and m are used to count the number of  

capital letters small letters and digits in the input string (password)

*/

//Initialize them to 0

k=0;l=0;m=0;

int length;

string pass;

cout<<"Password: ";

cin>>pass;

//Calculate length of input string

length = pass.length();

//The following variable is declared to determine if the input string meets criteria

int det = 0;

for(int i = 0;i<pass.length();i++)

{

 if(isupper(pass[i])){ k++;}

 if(islower(pass[i])){ l++;}

 if(isdigit(pass[i])){ m++;}    

}

if(k==0)

{

cout<<"Password doesn't contain capital letters "<<endl;

det++;

}

if(l==0)

{

cout<<"Password doesn't contain small letters "<<endl;

det++;

}

if(m==0)

{

cout<<"Password doesn't contain digit "<<endl;

det++;

}

if(length<8)

{

cout<<"Length of password is less than 8 "<<endl;

det++;

}

if(det == 0)

{

 cout<<"Password meets requirements "<<endl;

}    

 return 0;

}

Download cpp
4 0
3 years ago
Which activity should be part of a long-term plan to positively affect your
STatiana [176]
D that is the answer but I need 20 words to send this text
5 0
3 years ago
On CLIENT3, open Windows Explorer as Administrator. Open properties for C:\Program Files and select the Security tab to view the
defon

Answer:

1). Read & execute

2). List folder contents

3). Read

Explanation:

See image

5 0
3 years ago
A web application starts when a client sends _______ to a server?
vovangra [49]
A web application starts when a client sends a request to a server
6 0
3 years ago
Hello im bored wanna talk?
bazaltina [42]

Answer:

sure what's up

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • TCP will guarantee that your packets will arrive at the destination, as long as the connection is still established. True False
    11·1 answer
  • A virus that is triggered when certain logical conditions are met, such as opening a file or starting a program a certain number
    10·1 answer
  • What federation system technology uses federation standards to provide SSO and exchanging attributes?
    7·1 answer
  • Which is one use for a hyperlink? A. to create a heading style B. to animate important text C. to create a link to a website. D.
    7·1 answer
  • Linux is a kind of software whose code is provided for use, modification, and redistribution. what kind of software is this?
    5·1 answer
  • if ur parent gets mad at u and says something then u say something, why do they say "stop back talking'' if ur just starting a c
    7·2 answers
  • Mr. O would like to purchase a new computer for his home business. Mr. O's current computer runs very slow when he is running e-
    5·2 answers
  • ANY MHA FANS SAY DEKU
    6·1 answer
  • Is computing gcse easy or hard
    10·2 answers
  • What will the following program display in the console?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!