title: Selecting row (gps-position), when user was at two placed (two rows)
body: <p>I have an existing database which I cannot change. Each row is a gps-position with an ID. My problem: I need to select all ids, wich are in two bounds.</p>
  
  <p>A simplified example-table:</p>
  
  <pre><code>user;position
  userA;1
  userA;2
  userA;3
  userB;1
  userC;1
  userC;1
  </code></pre>
  
  <p>Now I d'like to have all <strong>users</strong>, which are at position 1 <strong>and</strong> 2. That means, only userA, because he has both positions. And yes, userC is twice in position 1, thats correct :-)</p>
  
  <p>My attempt:</p>
  
  <pre><code>SELECT user FROM `test` WHERE (position = 1 or position = 2) GROUP BY id HAVING count(user) &gt; 1
  </code></pre>
  
  <p>Problem: userC is selected too, because it has twice a position in 1</p>
  
  <p>Any ideas? Thanks very much!</p>