Question: 5. Join + Aggregate Function 1 > SET NOCOUNT ON; 3 4 /* 5 Write a query that returns the name and total value of

 5. Join + Aggregate Function 1 > SET NOCOUNT ON; 34 /* 5 Write a query that returns the name and total

5. Join + Aggregate Function 1 > SET NOCOUNT ON; 3 4 /* 5 Write a query that returns the name and total value of their sales for only the top seller. 6 Enter your query below. Please append a semicolon ";" at the end of the query */ 7 8 The final output should be one row of data with the name and total_value fields for the person with the highest total_value 9 go Schema You are provided 2 tables: employees, sales. employees Name Type Description id INTEGER User ID name STRING Name of the employee sales Name Type Description id INTEGER User ID order_id INTEGER The unique ID for the order total_items INTEGER Total number of items within the order total_value DECIMAL Total value of the order Sample Data Tables TABLE_ONE id name 1 John Emily N 3 Arthur TABLE_TWO id order_id total_items total_value 1 1 3 13.20 3 3 2 1 22.30 Expected output: name, amount

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!