title: How to join two rows in sql
body: <p>This is my sql code</p>
  
  <pre><code>SELECT b.book_id, concat(`first_name`, ' ', a.`last_name`) AS 'author_name', b.title
  FROM 
      `book_authors` ba JOIN `books` b ON ba.`book_id` = b.`book_id`
      JOIN `authors` a ON ba.`author_id` = a.`author_id`
  WHERE
      b.`book_id` &gt; 0 IN (SELECT c.`book_id`
                      FROM `book_authors` c
                      GROUP BY c.`book_id`)
  </code></pre>
  
  <p>But as you can see in this screenshot below, rows with the same book_id are printed separately. How can I 'join' them. So that the author field will be comma-seperated or something like that:</p>
  
  <p><img src="https://i.stack.imgur.com/CMFjr.png" alt="The screenshot"></p>