title: How to group same column values together with SQL?
body: <p>First off I am sorry if my question is unclear but it is kind of difficult to really express it in one short sentence. 
  Basically, I have a table that looks like this:</p>
  
  <pre><code>+-----------+-------------+
  | BookName  | BookAuthor  |
  +-----------+-------------+
  | A         | Arthur      |
  +-----------+-------------+
  | A         | Will        |
  +-----------+-------------+
  | B         | Jack        |
  +-----------+-------------+
  | B         | Jack        |
  +-----------+-------------+
  | B         | Charles     |
  +-----------+-------------+
  | A         | Will        |
  +-----------+-------------+
  | A         | John        |
  +-----------+-------------+
  </code></pre>
  
  <p>I am looking for a SQL query that could group both BookName and BookAuthor's same values to return, for each book name, which book author has the most entries associated.</p>
  
  <p>So following my example, BookName "A" would have "Will" as book author, and BookName "B" would have "Jack".</p>
  
  <p>I have tried this:
  <code>SELECT * FROM table GROUP BY BookName, BookAuthor HAVING BookName = "A"</code>, but the result that I will get is "Arthur".</p>
  
  <p>Any help appreciated; thanks a lot.</p>