Hi I have these two tables "Orders" and "Employees"
Orders Table
OrderID EmployeeID
1 1
2 1
3 2
4 7
5 2
. .
. .
. .
Employee Table
EmployeeID Firstname
1 Matin
2 Sina
3 Nima
. .
. .
. .
I want to find the name of the employee which has more Orders.
also this is not my home work:) I am learning Aggregate functions also this a part of my query but I can not get that how can i find the maximum???please help me !thanks
SELECt FirstName FROM Employees E INNER JOIN Orders O ON E.EmployeeID = O.EmployeeID (SELECT Count(EmployeeID) EmployeeCount FROM Orders GROUP BY EmployeeID)