title: Need simplify sql query with "count" function and "IN" operator
body: <p>I have a table only consisting of two columns: </p>
  
  <pre><code>ObjectID||PropertyID 
  </code></pre>
  
  <p>The task: get the all ObjectID whith PropertyID == (P1 and P2 and P3 and ...).</p>
  
  <p>I solved this task:</p>
  
  <pre><code>  SELECT *
    FROM  ( 
          SELECT SD.ObjectID ObjectID,
                 count( SD.ObjectID )  countMatchingProperties
            FROM table AS SD
           WHERE SD.PropertyID IN ( P1, P2, P3, ..., Pn ) 
           GROUP BY ObjectID 
      ) 
      AS C
   WHERE C.countMatchingProperties &gt; n-1
  </code></pre>
  
  <p>But I did not leave a thought that this task can be solved easier and faster.</p>