Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Select e.LastName from Products as p
- join [Order Details] as od
- on p.ProductID = od.ProductID
- Join Orders as o
- on o.OrderID= od.OrderID
- join Employees as e
- on e.EmployeeId=o.EmployeeID
- join suppliers as s
- on s.SupplierId=p.SupplieriD
- group by e.LastName
- having count(distinct s.SupplierId)>7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement