title: MySQL: query to sort data based on the attribute of another column
body: <p>So, coming up with a title for this is difficult</p>
  
  <pre><code>SELECT Date(p.born_at), SUM(p.value) as 'total_value_for_day'
  FROM puppies as p
  WHERE p.status = 2
  GROUP BY DATE(p.born_at);
  </code></pre>
  
  <p>So, this gives a 2 column result.</p>
  
  <p>What I want is this:</p>
  
  <p>columns:</p>
  
  <pre><code>date | status = 1 | status = 2 | status = 3
  DATA!!!
  </code></pre>
  
  <p>is there a way to do that?</p>