title: How to write an SQL query to fetch the id in a column that has all the required data in some other column?
body: <p>Suppose I have the following table,</p>
  
  <pre><code>+---------+------------+
  |   id    |    names   |
  +---------+------------+
  |   1     |      a     |
  |   1     |      b     |
  |   1     |      c     |
  |   1     |      d     |
  |   2     |      b     |
  |   3     |      a     |
  |   3     |      b     |
  |   3     |      c     |
  |   4     |      c     |
  +---------+------------+
  </code></pre>
  
  <p>I want to fetch the id using SQL query, which has all the names "a", "b", and "c".</p>
  
  <p>Here the answer would be 1 and 3.</p>
  
  <p>Please edit the title more suitable for the question above.</p>