title: Group By `status` and `user` field
body: <p>I have table structure like</p>
  
  <p><code>users(user_id, username);</code></p>
  
  <p><code>feedback(id, customer_id, user_id, status)</code></p>
  
  <p>where <code>status</code> will be <code>['scheduled', 'failed', 'cancelled']</code>;</p>
  
  <p>I want result like</p>
  
  <pre><code>| Username  | scheduled count   | failed count  | cancelled count   |
  |---------- |-----------------  |-------------- |-----------------  |
  | Sarah     | 10                | 5             | 2                 |
  | Alex      | 8                 | 7             | 5                 |
  </code></pre>
  
  <p>I tried a lot but failed to getting the result via <code>group by</code> clause.
  It gives result on the basis on username but not status.</p>
  
  <p>I tried some queries</p>
  
  <pre><code>sql&gt; select users.username, count(*) as cal
  from feedback
  join users on users.user_id = feedback.user_id
  group by feedback.user_id, feedback.status
  </code></pre>
  
  <pre><code>sql&gt; select users.username, count(*) as cal
  from feedback
  join users on users.user_id = feedback.user_id
  group by feedback.user_id
  </code></pre>
  
  <p>etc.</p>