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
cluponka [151]
3 years ago
14

Write a SELECT statement that returns three columns: EmailAddress, OrderID, and the order total for each customer. To do this, y

ou can group the result set by the EmailAddress and OrderID columns. In addition, you must calculate the order total from the columns in the OrderItems table.Write a second SELECT statement that uses the first SELECT statement in its FROM clause. The main query should return two columns: the customer’s email address and the largest order for that customer. To do this, you can group the result set by the EmailAddress column.
Computers and Technology
1 answer:
Debora [2.8K]3 years ago
7 0

Answer:

Select EmailAddress,max(total) from (Select EmailAddress, OrderID, sum(total) as total from OrderItems group by EmailAddress, OrderID) group by EmailAddress

Explanation:

First step is group the rows by email and order id and sum de total of orders

Select EmailAddress, OrderID, sum(total) as total from OrderItems group by EmailAddress, OrderID

Then you use the above query as a subquery grouping by the email and selecting the max value by client

Select EmailAddress,max(total) from (Select EmailAddress, OrderID, sum(total) as total from OrderItems group by EmailAddress, OrderID) group by EmailAddress

You might be interested in
What type of traffic always goes to all devices in a subnet?
zmey [24]
There are three types of traffic in an IP network:
1. Unicast -  one-to-one traffic (traffic from one sender to one receiver) 
2. Multicast - one to many traffic (one sender and more receivers) 
3.Broadcast -  every device in the network will receive the packet
So, the broadcast traffic <span>always goes to all devices in a subnet. </span>
6 0
3 years ago
How should the administrator enable users with permissions to use einstein analytics features
wariber [46]

Answer:

Einstein analytics plus user

Explanation:

Einstein data insights is a platform that can be used by a company to analyse Salesforce report. With a subscription to this platform, an administrator can grant limited access to users in the company and monitor the logs and reports.

To grant a user access to Einstein data insights, go to setup and find permission set on the quick find box, on the "permission set", click on "einstein analytics plus user", then click on "manage assignment | add assignment". Add the users you want and then click on "assign".

4 0
3 years ago
The security administrator for Corp wants to provide wireless access for employees as well as guests. Multiple wireless access p
Artemon [7]
It’s B I took the test
7 0
3 years ago
What are the hardware and software components of a computer​
DaniilM [7]

Answer:

I. Hardware components of a computer includes monitor, speaker, central processing unit, motherboard, hard-drive, joystick, mouse, keyboard, etc.

II. Software components of a computer includes operating system, registry keys, antivirus, media player, word processor, etc.

Explanation:

The hardware component of a computer can be defined as the physical parts or peripherals that enables it to work properly. Some examples of hardware components are monitor, speaker, central processing unit, motherboard, hard-drive, joystick, mouse, keyboard, etc.

A software component of a computer comprises of software application or program that are used by the computer to manage or control software application, computer hardware and user processes. Some examples of software components are operating system, registry keys, antivirus, media player, word processor, etc.

In conclusion, the hardware components of a computer are the physical parts that can be seen and touched while the software components cannot be touched but rather are installed as a program.

8 0
3 years ago
When was the speaker invented?
wlad13 [49]

Answer:

Explanation:

1876

4 0
3 years ago
Read 2 more answers
Other questions:
  • In the 2007/2010 version of Paint, which of the following tools are located in the View tab? (Select all that apply.)
    5·1 answer
  • The calls radioed to patrol officers, or assignments given to police patrol units by 911 dispatchers, reveal the types of proble
    9·1 answer
  • All of the following are forms of verbal communication except
    12·2 answers
  • Create a conditional expression that evaluates to string "negative" if userVal is less than 0, and "non-negative" otherwise. Ex:
    11·1 answer
  • A text file has been transferred from a Windows system to a Unix system, leaving it with the wrong line termination. This mistak
    15·1 answer
  • Write a function called convert_format which converts the format of a date from mm/dd/yyyy to month name dd, yyyy.
    12·1 answer
  • How Can I add a image in an HTML program?​ please tell
    6·1 answer
  • Which of the following statements about the relationship between hardware and software is true? a) Hardware can be present in in
    9·1 answer
  • You want a cable that could be used as a bus segment for your office network. The cable should also be able to support up to 100
    5·1 answer
  • Jasmine wants electrical current to be able to pass through a certain switch on a circuit board that she is designing. What stat
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!