title: How to rewrite Raw SQL Query (MySQL) with Django ORM query?
body: <p>How to rewrite next Raw SQL Query (MySQL) with Django ORM query?</p>
  
  <pre><code>mysql&gt; select author_id, 
                count(*) c 
          from library_books 
         group by author_id 
        having c&gt;2 
         limit 3;
  
  +---------------+----+
  
  |     author_id | c  |
  
  +---------------+----+
  
  |             0 | 39 |
  
  |          1552 | 17 |
  
  |          1784 |  8 |
  
  +---------------+-----
  </code></pre>