I am trying to write a query to find the top sales person in the shop and trying to Display the employee name, the shop where he/she is employed and the value of sales. I only want to output the employee with highest number of sales at the moment, my query outputs all the employees with their figures.
SELECT empnin, shopname, SUM( Rentalrate ) AS Sales
FROM frs_FilmRental
NATURAL JOIN frs_Shop
GROUP BY empnin
This is the following results I get with my query: