title: Selecting and displaying the count of rows with the same value in a table
body: <p>Basically this is a survey system and I want to count the Yes's and No's from my results table which has </p>
  
  <pre><code>  | q1  | q2  | q3 | q4 | q5 | q6  | q7 | q8  | q9  | q10 |
  
    | Yes | Yes | No | No | No | Yes | No | Yes | Yes | No  |
  
    | No | Yes | No | Yes | Yes | Yes | No | No  | Yes | No |
  
    | Yes | Yes | No | No | No | Yes | No | Yes | Yes | No  |
  
    | No | Yes | No | Yes | Yes | Yes | No | No  | Yes | No |
  </code></pre>
  
  <hr>
  
  <p>For example I want my result to be q1 = 2 No's 2 Yes and q2 = 4 yes 0 No's and so on
  Then after that I was hoping to display it in a simple table but I'm still clueless about the query</p>
  
  <hr>
  
  <pre><code>&lt;body&gt;
  
  &lt;form method="POST"&gt;
  
  
      &lt;table border="1"&gt;
  
              &lt;th&gt;Answered Yes&lt;/th&gt;
              &lt;th&gt;Answered No&lt;/th&gt;
          &lt;/tr&gt;
  
          &lt;?php
          include("testdb.php");
          $result= mysqli_query($con, "SELECT * FROM results");
  
          if($result){
  
          ?&gt;
  
  
      &lt;/table&gt;
  
  &lt;/body&gt;
  </code></pre>