title: using multiple find_in_set in a single query
body: <p>I have 2 tables:</p>
  
  <p>one is users with "userid" column, the other one is opinion with "yes" and "no" columns.
  The "yes" and "no" columns both contain comma separated values.</p>
  
  <p>What I wanted is to count the number of times a "userid" appears in the "yes" column as well as the number of times it appears in the "no" column.</p>
  
  <p>What I have right now is this</p>
  
  <pre><code>SELECT userid, COUNT(yes), COUNT(no)
  FROM users LEFT JOIN opinion ON (FIND_IN_SET( userid, yes) &gt; 0)
  GROUP BY userid
  </code></pre>
  
  <p>The above works as it counts the # of times each user appears in the "yes" column but incorrectly on the "no" column. echoing "no" results to the same result as echoing "yes"</p>
  
  <p>Sample data on "users"</p>
  
  <pre><code>1
  2
  3
  </code></pre>
  
  <p>Sample data on "yes"</p>
  
  <pre><code>1,2
  1,3
  2,3
  1
  </code></pre>
  
  <p>Sample data on "no"</p>
  
  <pre><code>1,2
  1,2
  1,3
  </code></pre>
  
  <p>desired result is with data above:</p>
  
  <pre><code>users     yes    no
  1         3      3
  2         2      2
  3         2      1
  </code></pre>
  
  <p>Thanks in advance for any help</p>