title: Filter query with a GROUP BY based on column not in GROUP BY statement
body: <p>Given the following table structure and sample data:</p>
  
  <p><code>
  +-------------+------+-------------+
  | EmployeeID   | Name  | WorkWeek  |
  +--------------+-------+-----------+
  |   1          | A     |     1     |
  |   2          | B     |     1     |
  |   2          | B     |     2     |
  |   3          | C     |     1     |
  |   3          | C     |     2     |
  |   4          | D     |     2     |
  +--------------+-------+-----------+
  </code> </p>
  
  <p>I am looking to select all employees that only worked week 1 (so in this example, only <code>employeeid = 1</code> would be returned.  I am able to get the data with the following query:</p>
  
  <p><code>SELECT  EmployeeId, Name
   FROM    SomeTable
   GROUP BY EmployeeId, Name
   HAVING  SUM ( WorkWeek ) = 1;</code></p>
  
  <p>To me, the <code>HAVING SUM( WorkWeek ) = 1</code> is a hack and this should be handled with some form of a <code>GROUP BY</code> and <code>COUNT</code> but I cannot wrap my head around how that query would be structured.</p>
  
  <p>Any help would be useful and enlightening.</p>