Question

Q21: You are asked to find out the top sales representative (by the accumulated dollar amount...

Q21: You are asked to find out the top sales representative (by the accumulated dollar amount of orders) in Northwind. Write a SQL command to return the LastName, FirstName and the total dollar amount of orders of that employee under the column Total with a dollar sign ($) as prefix. (1 mark)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Since you have not provided the schema details, I am guessing the table and column names and providing you the query. Hence, these queries might need some modification. Reach out to me via the comment section in case you need help.

The query is:

SELECT LastName, FirstName, concat('$', , sum(OrderAmount)) AS Total FROM EMPLOYEE WHERE City = 'Northwind' GROUP BY EmployeeId ORDER BY sum(OrderAmount) DESC LIMIT 1;

Add a comment
Know the answer?
Add Answer to:
Q21: You are asked to find out the top sales representative (by the accumulated dollar amount...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The Northwind database created by Microsoft contains the sales data for a fictitious company called Northwind...

    The Northwind database created by Microsoft contains the sales data for a fictitious company called Northwind Traders, which imports and exports specialty foods from around the world. Here is the schema of the database: Products (ProductID, ProductName, SupplierID, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued); Suppliers (SupplierID, CompanyName, ContactName , ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax, HomePage); Categories (CategoryID, CategoryName, Description, Picture); Orders (OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia,  Freight, ShipName,ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry); Order_details (ID, OrderID,...

  • with SCREENSHOTS PLEASE Linux+ Guide to Linux Certification Project 9-4 In this hands-on project, you view...

    with SCREENSHOTS PLEASE Linux+ Guide to Linux Certification Project 9-4 In this hands-on project, you view and manage processes using the top command-line utility. 1. On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of LNXrocks!. 2. At the command prompt, type top and press Enter. 3. From the output on the terminal screen, record the following information: a....

  • If possible please just send the SQL statement. Thank you Each question within deliverable 3 must begin on a new page and be sure to document the question as the title of each item at the top o...

    If possible please just send the SQL statement. Thank you Each question within deliverable 3 must begin on a new page and be sure to document the question as the title of each item at the top of each page. Also, using a 12-point font, include the SQL statement and then provide a screen shot of each query. The screen shots must include both the SQL statement and the results for each item below based on the data entered in...

  • Questions are based on the Northwind database. a. A data dictionary (Excel file) that describes each...

    Questions are based on the Northwind database. a. A data dictionary (Excel file) that describes each of the tables. (Attached in question) b.    Write good, clean SQL that answers the following questions. c.     Separate your queries as I have done in the following example. End each query with a semicolon (;) and insert the word "go" between each query. Queries can span multiple lines if required. Select CustomerID from Customers; go Select Count(*) from Employees; go Select max(productID) from Products; 18. Produce...

  • employees.txt Instructions You will be using Eclipse for all assignments in this course. You can download...

    employees.txt Instructions You will be using Eclipse for all assignments in this course. You can download Eclipse from the Virtual Desktop. Please write a Java program that follows the instructions below. There are two files to download. AvaCam Inc. is interested in the electronic computation of their payroll. They have reached out, and you have agreed to write a program to help them. They have sent you the file employees.txt (right-click to download the file). Store this file in the...

  • Can you please provide the formula for the worksheet also. CASE PROBLEMS Level 1- Analyzing Sales...

    Can you please provide the formula for the worksheet also. CASE PROBLEMS Level 1- Analyzing Sales for Crèmes Ice Cream Judd Hemming is the eastern regional marketing manager for Crèmes Ice Cream. Eac quarter, he completes two separate analyses: an analysis comparing ice cream flavor sale volumes from all regional locations with the same quarter sales volumes from the previou year and an analysis comparing total sales in dollars, including mean, median, mode, and standard deviation, of sales by store....

  • Division from last year. The Controller has asked you to compute the ROI and Residual Income...

    Division from last year. The Controller has asked you to compute the ROI and Residual Income based on data from last year and if the division adds a new product line. Use the Information Included in the Excel Simulation and the Excel functions described below to complete the task. . Cell Reference: Allows you to refer to data from another cell in the worksheet. From the Excel Simulation below. If in a blank cell. "=G5" was entered, the formula would...

  • CMPS 12B Introduction to Data Structures Programming Assignment 2 In this project, you will write...

    can i get some help with this program CMPS 12B Introduction to Data Structures Programming Assignment 2 In this project, you will write a Java program that uses recursion to find all solutions to the n-Queens problem, for 1 Sns 15. (Students who took CMPS 12A from me worked on an iterative, non-recursive approach to this same problem. You can see it at https://classes.soe.ucsc.edu/cmps012a/Spring l8/pa5.pdf.) Begin by reading the Wikipcdia article on the Eight Queens puzzle at: http://en.wikipedia.org/wiki/Eight queens_puzzle In...

  • ask back to top Background You are a manager in the audit division at Miller Yates...

    ask back to top Background You are a manager in the audit division at Miller Yates Howarth (MYH), an accounting firm with offices throughout the major regional centres of NSW and Queensland. Although a medium sized firm by national standards, MYH is the second largest regional accounting firm in Australia. Most of MYH’s audit clients are in the agriculture, mining, manufacturing and property industries. All those industries are currently under pressure, either from a downturn in commodity prices or fierce...

  • Here the handout along with the template of what we need to complete. Thank you! Harrod's...

    Here the handout along with the template of what we need to complete. Thank you! Harrod's Sporting Goods Jim Harrod knew that service, above all, was important to his customers. Jim and Becky Harrod had opened their first store in Omaha, Nebraska in 1997. Harrod's carried a full line of sporting goods including everything from baseball bats and uniforms to fishing gear and hunting equipment. By the year 2015, there were twelve Harrod stores producing $5 million in total sales...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT