title: How to select duplicate rows and group by two columns
body: <p>I have the following table:</p>
  
  <pre><code>ID|user_id|group_id|subject |book_id
   1| 2     |3       |history |1
   2| 4     |3       |history |1
   3| 5     |3       |art     |2
   4| 2     |3       |art     |2
   5| 1     |4       |sport   |5
  </code></pre>
  
  <p>I would like to list all rows for group 3(id) that have duplicate rows with the same subject_id and book_id. The subject and book_id is what would determine the 2 or more rows to be duplicate.</p>
  
  <p>I would like my distinct results to look like this:</p>
  
  <pre><code>|subject |book_id|
  |history |1      |
  |art     |2      |
  </code></pre>
  
  <p>Using either query builder or eloquent</p>