title: SQL : get all users in many specific group
body: <p>I have a SQL problem which seem simple but I can't find the solution...</p>
  
  <p>I have 3 tables :</p>
  
  <p>1) "user" (id, lastname, firstname)</p>
  
  <p>2) "user_x_group" (id_user, id_group)</p>
  
  <p>3) "group" (id, name)</p>
  
  <p>A "user" can have many "group".</p>
  
  <p>What is the query to get all the users in the group 1 and the group 2 at the same time ?</p>
  
  <pre><code>SELECT *
  FROM user u 
  JOIN user_x_group x ON x.id_user = u.id 
  WHERE id_group IN ('1', '2') 
  </code></pre>
  
  <p>is not correct because I get all users in group 1 + all users in group 2 + all users in group 1&amp;2. I just need all users in group 1&amp;2 in one query.</p>
  
  <p>How to do that ?</p>