title: subtotal and total for strings
body: <p>I have a table named abc with 2 columns-city and houses.(I am using MYSQL 6.0)</p>
  
  <pre><code> houses            city
      A               P
      B               Q
      C               P
      D               R
      E               P
      F               S
      G               S
  </code></pre>
  
  <p>I want the output in this way:</p>
  
  <pre><code>houses             city
  A                   p                  
  C                   p
  E                   p
  noofhouses:         3
  
  B                   Q
  noofhouses:         1 
  
  D                   R
  noofhouses:         1
  
  F                   S
  G                   S
  noofhouses:         2
  totalhouses         7
  </code></pre>
  
  <p>So basically i want a list of names of houses and no. of houses in a city.
  is that possible??
  please help.
  Thanks in advance.</p>