0
如何用Django ORM查詢重寫下一個原始SQL查詢(MySQL)?如何用Django ORM查詢重寫原始SQL查詢(MySQL)?
mysql> select author_id,
count(*) c
from library_books
group by author_id
having c>2
limit 3;
+---------------+----+
| author_id | c |
+---------------+----+
| 0 | 39 |
| 1552 | 17 |
| 1784 | 8 |
+---------------+-----