Question: 2. Write a SELECT statement that returns two columns: Company Name and SumOfAllOrders, where SumofAllOrders is the sum of all orders for the named company.

 2. Write a SELECT statement that returns two columns: Company Name

2. Write a SELECT statement that returns two columns: Company Name and SumOfAllOrders, where SumofAllOrders is the sum of all orders for the named company. Group the result set by Company Name. Return only 10 rows, corresponding to the 10 companies who have had the most expensive total orders. Order the result set by who has spent the most first. Hint: Use the TOP clause and join the Customers, Orders, and Order Details tables

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!