title: sql select records with matching subsets
body: <p>There are two sets of employees: managers and grunts.<br>
  For each manager, there's a table manager_meetings that holds a list of which meetings each manager attended.  A similar table grunt_meetings holds a list of which meetings each grunt attended. </p>
  
  <p>So:</p>
  
  <pre><code>manager_meetings                          grunt_meetings
  managerID      meetingID                  gruntID        meetingID
  1              a                          4              a
  1              b                          4              b
  1              c                          4              c
  2              a                          4              d
  2              b                          5              a 
  3              c                          5              b
  3              d                          5              c
  3              e                          6              a 
                                            6              c 
                                            7              b 
                                            7              a
  </code></pre>
  
  <p>The owner doesn't like it when a manager and a grunt know exactly the same information.  It makes his head hurt.  He wants to identify this situation, so he can demote the manager to a grunt, or promote the grunt to a manager, or take them both golfing.  The owner likes to golf.</p>
  
  <p>The task is to list every combination of manager and grunt where both attended exactly the same meetings.  If the manager attended more meeting than the grunt, no match.  If the grunt attended more meetings than the manager, no match.  </p>
  
  <p>The expected results here are:</p>
  
  <pre><code>ManagerID            GruntID
  2                    7
  1                    5 
  </code></pre>
  
  <p>...because manager 2 and grunt 7 both attended (a,b), while manager 1 and grunt 5 both attended (a,b,c).</p>
  
  <p>I can solve it in a clunky way, by pivoting up the subset of meetings in a subquery into XML, and comparing each grunt's XML list to each manager's XML.  But that's horrible, and also I have to explain to the owner what XML is.  And I don't like golfing.</p>
  
  <p>Is there some better way to do <code>"WHERE {subset1} = {subset2}"</code>?  It feels like I'm missing some clever kind of join.</p>
  
  <p><a href="http://sqlfiddle.com/#!3/3ce50/1">SQL Fiddle</a></p>