Question: What is the largest purchase made by each employee? Include EmployeeID, FirstName, LastName and amount of the largest purchase. ( Name it MaxAmt ) .

What is the largest purchase made by each employee? Include EmployeeID, FirstName, LastName and amount of the largest purchase. (Name it MaxAmt).(Hint, use a subquery in the FROM clause to total each Purchase. To create a total use the Sum () function. Use a MAX function in the main select query to get the max on the total for each Purchase. Use joins in main query and subquery. ) Note: Due to an idiosyncracy of SQL Server, to evaluate the problem correctly, you must also use the round function to elimnate extraneous decimal digits, i.e. to create the total use Round(Sum(....),2). Otherwise you may not get full credit. Also MySQL prefers that there be no spaces between a function name and the left parenthesis.

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!