title: Find SQL table rows where there are multiple different values
body: <p>I want to be able to filter out groups where the values aren't the same. When doing the query:</p>
  <pre class="lang-sql prettyprint-override"><code>SELECT 
      category.id  as category_id, 
      object.id    as object_id,
      object.value as value
  FROM
      category,
      object
  WHERE
      category.id = object.category
  
  </code></pre>
  <p>We get the following results:</p>
  <pre><code> category_id | object_id | value
  -------------+-----------+-------
         1     |     1     |     1
         1     |     2     |     2
         1     |     3     |     2
         2     |     4     |     3
         2     |     5     |     2
         3     |     6     |     1
         3     |     7     |     1
  </code></pre>
  <p>The goal: Update the query so that it yields:</p>
  <pre><code> category_id 
  -------------
         1     
         2     
  </code></pre>
  <p>In other words, find the categories where the values are different from the others in that same category.</p>
  <p>I have tried many different methods of joining, grouping and so on, to no avail.</p>
  <p>I know it can be done with multiple queries and then filter with a little bit of logic, but this is not the goal.</p>