extreme64
5/15/2016 - 10:51 AM

SQL HAVING Example

SQL HAVING Example

#sql #mysql
SELECT Employees.LastName, COUNT(Orders.OrderID) AS NumberOfOrders FROM (Orders
INNER JOIN Employees
ON Orders.EmployeeID=Employees.EmployeeID)
GROUP BY LastName
HAVING COUNT(Orders.OrderID) > 10;