title: Find duplicates for combination of two columns in a MySQL database
body: <p>I work on a dataset with three different columns: <code>pile</code>, <code>position</code> and <code>info</code>.</p>
  
  <p>There is no duplicate in the database, but it can happen, that for one combination of <code>pile</code> and <code>position</code> there is one or two different texts in the info column. And those are the entries I tried to find.</p>
  
  <p>I tried the following</p>
  
  <pre><code>SELECT COUNT(DISTINCT(`pile`, `position`)) FROM db;
  </code></pre>
  
  <p>But received an error message</p>
  
  <pre><code>ERROR 1241 (21000): Operand should contain 1 column(s)
  </code></pre>
  
  <p>Is there a way to find distinct combinations of values in two columns?</p>