title: Blank Table Result
body: <p>I am having a problem with my database. I have replicated it using adventure works 2014.</p>
  
  <p>I want to show all results where the BusinessEntityID shows more than once. So if a user has been a member of two deparments, their ID will show twice </p>
  
  <p>But this is what I get with the below query.
  <a href="https://i.stack.imgur.com/3bsYU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3bsYU.png" alt="enter image description here"></a></p>
  
  <pre><code>SELECT Person.FirstName,
         Person.LastName,
         HumanResources.Department.Name AS CurrentDepartment,
         StartDate,
         EndDate
  FROM AdventureWorks2014.Person.Person
  JOIN HumanResources.EmployeeDepartmentHistory
      ON HumanResources.EmployeeDepartmentHistory.BusinessEntityID = Person.BusinessEntityID
  JOIN HumanResources.Department
     ON EmployeeDepartmentHistory.DepartmentID = HumanResources.Department.DepartmentID
  GROUP BY Person.BusinessEntityID,
           HumanResources.Department.DepartmentID,
           Person.FirstName,
           Person.LastName,
           HumanResources.Department.Name,
           StartDate,
           EndDate
  HAVING COUNT(Person.BusinessEntityID) &gt; 1
  ORDER BY Person.LastName, StartDate 
  </code></pre>
  
  <p>I remove the Having I do get returned result(the whole table). So I think I know where the problem is not what it is / how to resolve it. </p>