title: Postgres query returning books with only one author
body: <p>I'm trying to make a query returning the book title, the book summary and the author name from the books with only one author ordered by the book id. A book can have many authors and an author can write many books, so it's a many to many relationship, but I'm making something wrong or forgetting something.</p>
  
  <p>My tables are:</p>
  
  <pre><code>book_tb(id, title, summary);
  author_tb(id, name);
  book_author_tb(id, book_id, author_id);
  </code></pre>
  
  <p>And I have tried:</p>
  
  <pre><code>SELECT b.title, b.summary, a.name 
  FROM book_tb b
  INNER JOIN book_author_tb ba ON b.id = ba.book_id
  INNER JOIN author_tb a ON ba.author_id = a.id
  GROUP BY b.title, b.summary, a.name, b.id
  HAVING count(ba.author_id) = 1
  ORDER BY b.id;
  </code></pre>