title: How to make a table view just use one query in sql
body: <p>I have a table in database like this</p>
  
  <pre><code>NAME    |GENDER|
  JONH    |MALE
  NGUYEN  |MALE
  TRAN    |FAMALE
  THUY    |FAMALE
  LINH    |FAMALE
  </code></pre>
  
  <p>And now, How can I make a sql query for get result like this:</p>
  
  <pre><code>GENDER  |NUMBER
  FAMALE  |3
  MALE    |2
  </code></pre>