title: MySQL - select groups having values covering a set
body: <p>I have two tables:</p>
  
  <pre><code>CREATE TABLE user (
      user_id INT PRIMARY KEY,
      ...
  );
  CREATE TABLE action (
      action_id INT PRIMARY KEY,
      user_id INT FOREIGN KEY REFERENCES user(user_id),
      action_type TINYINT,
      ...
  );
  </code></pre>
  
  <p>Each time a user performs a particular action, a row is inserted into the <code>action</code> table.</p>
  
  <p>Now I want to find all users who have performed all of some set of actions.  Something like this:</p>
  
  <pre><code>SELECT user_id
  FROM user, action
  HAVING SET(action_type) INTERSECT (0,3,4,5) = (0,3,4,5);
  </code></pre>
  
  <p>But of course I've just made up that last line.  Is there a good way of doing this in SQL?</p>