1USE AdventureWorks2016;
2GO
3SELECT DISTINCT c.LastName, c.FirstName, e.BusinessEntityID
4FROM Person.Person AS c JOIN HumanResources.Employee AS e
5ON e.BusinessEntityID = c.BusinessEntityID
6WHERE 5000.00 IN
7 (SELECT Bonus
8 FROM Sales.SalesPerson sp
9 WHERE e.BusinessEntityID = sp.BusinessEntityID) ;
10GO
11