title: SQL concatenate rows query
body: <p>Say we have a table</p>
  
  <pre>
  table <b>posts</b>
  +---------+-----------+--------------------------------+
  | postId  | title     | status    | bodyText           |
  +---------+-----------+--------------------------------+
  |   1     | Hello!    | deleted   | A deleted post!    |
  |   2     | Hello 2!  | deleted   | Another one!       |
  |   3     | New 1     | new       | A new one!         |
  |   4     | New 2     | new       | A new one again!   |
  </pre>
  
  <p>Can we, in SQL, retrieve a concatenation of a field across rows, by issuing a single query, not having to do the join up in a loop in our back-end code?</p>
  
  <p>Something like</p>
  
  <pre>
  select title from posts group by status ;
  </pre>
  
  <p>Should give a result like</p>
  
  <pre>
  +---------+--------------------+
  | deleted | Hello!, Hello 2!   |
  | new     | New 1, New 2       |
  </pre>