Skip to content

Instantly share code, notes, and snippets.

@bartubozkurt
Created June 13, 2021 09:36
Show Gist options
  • Save bartubozkurt/71372a8bbcedee33dc19e4d88e5b52c6 to your computer and use it in GitHub Desktop.
Save bartubozkurt/71372a8bbcedee33dc19e4d88e5b52c6 to your computer and use it in GitHub Desktop.
lists the employees that have registered more than 10 orders
SELECT Employees.LastName, COUNT(Orders.OrderID) AS NumberOfOrders
From (Orders
INNER JOIN Employees ON Orders.EmployeesID = Employees.EmployeeID)
GROUP BY LastName
HAVİNG COUNT(Orders.OrdersID) > 10;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment