title: Find rows with same ID and have a particular set of names
body: <p>EDIT:</p>
  
  <p>I have a table with 3 rows like so.</p>
  
  <pre><code>ID    NAME REV
  1     A    0
  1     B    0
  1     C    0
  2     A    1
  2     B    0
  2     C    0
  3     A    1
  3     B    1
  </code></pre>
  
  <p>I want to find the ID wich has a particular set of Names and the REV is same
  example:
  Edit2: GBN's solution would have worked perfectly, but since i do not have the access to create new tables. The added constraint is that no new tables can be created.</p>
  
  <pre><code>if input = A,B then output is 3
  if input = A ,B,C then output is 1 and not 1,2 since the rev level differs in 2.
  </code></pre>