title: MySQL compare all rows that share a given column value with rows that share another
body: <p>Hello I am tying to compare the data contained in the <code>value</code> column for all rows containing <code>36</code> in the <code>customized_id</code> column and all rows containing <code>21</code>. I am interested in observing any variance between this data. Thank you!</p>
  
  <pre><code>| Customized_id  |  value  |
  ----------------------------
  |     36         |  PASS   |
  |     36         |  FAIL   |
  |     36         |  PASS   |
  |     21         |  PASS   |
  |     21         |  PASS   |
  |     21         |  FAIL   |
  </code></pre>
  
  <p>Using the following I was able to return somthing close to what i want, but the rows keep repeating on and on, which I am not sure how to fix. Once I have only the desired data returned, I would like to display only the rows where there is a difference in the "value" column data (PASS/FAIL) for each customized_id row. </p>
  
  <pre><code>SELECT b.customized_id, b.value, c.customized_id, c.value
  FROM `redmine`.`custom_values` 
  left join `redmine`.`custom_values` as b
        on b.customized_id = '36'
  left join `redmine`.`custom_values` as c
        on c.customized_id = '21';
  
  
  
  | Customized_id  |  value  | Customized_id   |  value |
  ------------------------------------------------------------------------------------
  |     36         |  PASS   |     21         |  FAIL   |
  |     36         |  PASS   |     21         |  FAIL   |
  |     36         |  PASS   |     21         |  PASS   |
  |     36         |  PASS   |     21         |  PASS   |
  |     36         |  PASS   |     21         |  PASS   |
  |     36         |  PASS   |     21         |  PASS   |
  </code></pre>