title: Select where user roles 1 and 2 SQL query
body: <p>The following is what I got right now, which does not work properly because it checks one row for two different values.</p>
  
  <pre><code>SELECT users.* 
  FROM users INNER JOIN roles_users ru ON users.id = ru.user_id
  WHERE ru.role_id = 1 AND ru.role_id = 2 
  </code></pre>
  
  <p>I would like to select all users that have two rows in roles_users. The one rows role_id should have one and the second should have role_id two.</p>
  
  <p>So select all users that have two rows in the roles_users where one of them has <code>role_id = 1</code> and the other has <code>role_id = 2</code>.</p>
  
  <p>The above query selects all users that have one row in roles_users that has first one and then two, that's why I get no results and it does not work. So how can I do this right?</p>