title: I have a column called Gender, how can I count male and female group by division
body: <p>I have a column called Gender, how can I count male and female group by division</p>
  <p>Here is my Table:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID</th>
  <th>Name</th>
  <th>Gender</th>
  <th>Division</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>Jose Rizal</td>
  <td>Male</td>
  <td>Manila</td>
  </tr>
  <tr>
  <td>2</td>
  <td>Maria Clara</td>
  <td>Female</td>
  <td>Cebu</td>
  </tr>
  <tr>
  <td>3</td>
  <td>Brando Hervala</td>
  <td>Male</td>
  <td>Cebu</td>
  </tr>
  <tr>
  <td>4</td>
  <td>Sampurna Makabi</td>
  <td>Male</td>
  <td>Manila</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Output expectation :</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Division</th>
  <th>Total Male</th>
  <th>Total Female</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Manila</td>
  <td>2</td>
  <td>0</td>
  </tr>
  <tr>
  <td>Cebu</td>
  <td>1</td>
  <td>1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>My SQL query is:</p>
  <pre><code>SELECT
       Division
      ,(
          Select
              COUNT(Gender)
          from Table
          where gender = 'Male'
       ) as 'Total Male'
      ,(
          Select
              COUNT(Gender)
          from Table
          where gender = 'Female'
       ) as 'Total Female'
  FROM Table
  GROUP by Division
  </code></pre>