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
Antiglare screens are sometimes called ____.
yaroslaw [1]
Simply a glare screen, because it clearly states what it protects one against, I guess.
8 0
3 years ago
The fastest way to get help is to type a word or two in the search box.
Elanso [62]
The fastest way to get help is to type a word or two in the search box. TRUE.
5 0
3 years ago
Suppose you are among those who believe that the NLRA should be transformed. What arguments support the claim that a complete ov
miss Akunina [59]

Answer:

See explanation below.

Explanation:

Note: This question is not complete. The complete question is therefore provided before answering the question follows:

Suppose you are among those who believe that the NLRA should be transformed. What arguments support the claim that a complete overhaul is necessary? What alternative models might be considered as a replacement for the NLRA model of exclusive representation?

The explanation of the answers is now provided as follows:

a. What arguments support the claim that a complete overhaul is necessary?

The adversarial nature of labor relations in the United States, which many claim is produced by the National Labor Relations Act's (NLRA)'s very existence, is the fundamental reason for its transformation. In a global economy, supporters of transformation say that adversarialism is undesirable for employees and employers because it makes representation and profit maximization more difficult. The principles of exclusive representation and majority support are specific aspects of the NLRA that promote adversarialism.

The fact that it is compulsory for a union to win the support of a majority of workers, the process of representation results into a tone of a "u versus. them". As a result, both sides try to make the other look bad in the eyes of the employees who will vote.

Based on the above, a  complete overhaul is necessary.

b. What alternative models might be considered as a replacement for the NLRA model of exclusive representation?

Giving nonmajority unions legal protection by requiring employers to negotiate with them is one alternative to replace the NLRA model of exclusive representation. Under this, the contracts would not cover all employees; only those who are union members would be covered.

Another alternative is that work councils could also be used to supplement or replace the certification process. Employee free speech rights, wrongful dismissal procedures, employee participation on business boards of directors, and the right to workplace information are all potential transformation factors that might be taken into consideration.

3 0
3 years ago
How would you maximize the use of outsourced programmers?
Lerok [7]

Answer:

the answer is: release them when the project is complete

Explanation:

8 0
3 years ago
Which of the following are safety guidelines when socializing online?
DochEvi [55]

Answer:

All of them execpt five and three.

Explanation:

It is okay to have social media and receive messages.

3 0
2 years ago
Other questions:
  • _____ is a method of delivering software, in which a vendor hosts the applications, and customers access these applications over
    10·1 answer
  • All of the following are qualities of an aprenticeship except
    12·1 answer
  • Pretrial services programs are also known as early intervention programs. <br> a. True <br> b. False
    15·1 answer
  • In report design view, you can use commands on the align button of the _____ tab.​
    11·1 answer
  • One metric ton is approximately 2,205 pounds.
    6·1 answer
  • 1. What conversion factor should be used to convert from Gigaliters to liters?
    14·1 answer
  • The syntax for accessing a class (struct) member using the operator -&gt; is ____.
    15·2 answers
  • What typically happens by default when a file is double clicked in Microsoft Windows?
    9·1 answer
  • Microsoft windows malicious software removal tool fake or real
    8·1 answer
  • What are some best practices for file management
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!