Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 MaxAmtHint 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, ie to create the total use RoundSum 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started