title: How to select count of different values in the corresponding column in SQL?
body: <p>I have a table with 3 columns: first one is ID(not important here), second is number, and third is answer. The second and third column data is as follows:</p>
  
  <pre><code>number : answer
  1      : yes
  1      : yes
  1      : no
  2      : yes
  2      : no
  3      : yes
  3      : no
  3      : no
  </code></pre>
  
  <p>The output is supposed to be</p>
  
  <pre><code>number - total Yes - total No
  1      -   2       -  1
  2      -   1       -  1
  3      -   1       -  2
  </code></pre>
  
  <p>i.e. the total number of yes and no for each number. Can someone guide me as to how to write this select query?</p>