title: Simple SQL Statement to Shrink Rows
body: <p>I have a simple table that is grouped by the <code>INTERVAL</code> column. Each <code>INTERVAL</code> has three corresponding rows, and each row has one value that corresponds to the average of some type of weight losses while the other types of weight losses are <code>NULL</code>. I would like to put all three types of weight losses into one row. Is there any simple way to achieve this?</p>
  <p>Here is the original table that I have:</p>
  <p><img src="https://i.stack.imgur.com/8anwC.png" alt="Table" /></p>
  <p>Here is the table that I want it to look like:</p>
  <pre><code> ---------------------------------------------------------------
  | INTERVAL | AVG los MANAGED | AVG los NPIC | AVG los UNMANAGED |
   ---------------------------------------------------------------
  |1000-1249 | 54.627118644067 | 52.485833333 | 46.379746835443   |
   ---------------------------------------------------------------
  |1250-1499 | 39.734567901234 | 36.705544933 | 33.1023622047244  |
   ---------------------------------------------------------------
  | ...      | ...             | ...          | ...               |
   ---------------------------------------------------------------
  </code></pre>