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
Rina8888 [55]
3 years ago
13

Write a SELECT statement that returns one row for each customer that has orders with these columns: The email_address from the C

ustomers table
A count of the number of orders

The total amount for each order

(Hint: First, subtract the discount amount from the price. Then, multiply by the quantity.) Return only those rows where the customer has more than 1 order. Sort the result set in descending sequence by the total amount . Hint: You will join three tables together. Returns 3rows of data.

Questions done up until #4: https://pastebin.com/LwSKknPi

all questions before and after:

Write a SELECT statement that returns these columns:

The count of the number of orders in the Orders table

The sum of the tax_amount columns in the Orders table

Returns 1 row of data.

Write a SELECT statement that returns one row for each category that has products with these columns:

The category_name column from the Categories table

The count of the products in the Products table

The list price of the most expensive product in the Products table

Sort the result set so the category with the most products appears first.

Hint: You will join two tables together. Returns 3 rows of data.

Write a SELECT statement that returns one row for each customer that has orders with these columns:

The email_address column from the Customers table

The sum of the item price in the Order_Items table multiplied by the quantity in the Order_Items table

The sum of the discount amount column in the Order_Items table multiplied by the quantity in the Order_Items table

Sort the result set in descending sequence by the item price total for each customer.

Hint: You will join three tables together. Returns 7 rows of data.

Modify the solution to exercise 4 so it only counts and totals line items that have an item_price value that’s greater than 400. Returns 2 rows of data.

Write a SELECT statement that answers this question: What is the total amount ordered for each product? Return these columns:

The product name from the Products table

The total amount for each product in the Order_Items (Hint: You can calculate the total amount by subtracting the discount amount from the item price and then multiplying it by the quantity)

Use the WITH ROLLUP operator to include a row that gives the grand total.

Hint: You will join two tables together. Returns 10 rows of data.

Write a SELECT statement that answers this question: Which customers have ordered more than one product? Return these columns:

The email address from the Customers table

The count of distinct products from the customer’s orders

Hint: You will join three tables together. . Returns 3 rows of
Computers and Technology
1 answer:
bazaltina [42]3 years ago
7 0

Answer:

Please find the attachment files of the queries:

Explanation:

In the all queries the select statement is used that selects the defined columns and use the function like sum, join, orderby, and groupby to perform the various operations, in which the sum is used to add columns or rows values, join is used for joining two or more tables, and orderby is used for return the table into ascending or descending order, and groupby is used for the count the value, calculate average and perform other operation and gives its return value.

You might be interested in
InJava garbage collection is done by_______________JVM (Java VirtualMachine)ProgrammerBoth JVM (Java Virtual Machine)and Program
lozanna [386]

Answer: Java Virtual Machine(JVM)

Explanation: In java,there is the process of the management of the memory by own self or automation , this is known as the garbage collection .The program in it compile to be executed by the java virtual machine(JVM).During this process , object get together in a sort of heap and then unnecessary object are detected which are of no use and delete them to make space for the memory  . Therefore, garbage collection is carried out by java virtual machine(JVM).

7 0
3 years ago
One form of Intrusion Detection System (IDS) starts operation by generating an alert for every action. Over time, the administra
soldier1979 [14.2K]

Answer:

advantages

- detect anomalies

- information for new security rules

disadvantages

- false alarms

Explanation:

Advantages

- With an IDS we can check and track every attack or detect anomalies even when you don't know about these behaviors.

- When an IDS detects anomalies, the system generates information about these behaviors and you can create new rules for these attacks.

Disadvantages

- When we use an IDS, we could receive false alarms because we cannot predict every behavior.

4 0
4 years ago
A(n _______ is a storage device that contains one or more inflexible, circular platters that use magnetic particles to store dat
Len [333]
The storage device is an hard drive.
8 0
3 years ago
Mobile legends new hero in october aamon is coming in october 26th
defon

Answer:

yellow

Explanation:

3 0
3 years ago
Read 2 more answers
Waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
True [87]

Answer:

AGGHHHHHHHHHHHHHHHHHHHGHGHHHHHH

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • Describe mobile computing
    7·1 answer
  • Aaron has elaborate systems set up on his computer to remind him of all the things he has to do and when he has to do them. The
    12·1 answer
  • What are ways to enter formula in Excel? Check all that apply
    8·2 answers
  • A technician recently fixed a computer with several viruses and spyware programs on it and notices the Internet settings were se
    15·1 answer
  • Choose all items that represent characteristics of HTML:
    13·2 answers
  • What does a converter do? A. It converts one technological system into another. B. It converts one type of electrical signal int
    10·2 answers
  • Drow flowchart that finds a<br> series between 10, 100<br> fibonanchi
    6·1 answer
  • Which of these parts of a computer produces an observable result?
    11·2 answers
  • PROGRAM LANGUAGE C
    5·1 answer
  • Web servers deliver web pages to your computer using a protocol known as ______. Select your answer, then click Done.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!