Sobes.tech
Junior — Senior

Django ORM: selecting authors with more than five books

livecode

Task condition

You need to create a query in Django ORM that returns all writers who have more than five related books. Use the models Writer and Publication as data sources, where Writer has fields id and name, and Publication has fields id, name, and writer_id (a foreign key to Writer). Formulate the query using Django ORM.

Writer: id name

Publication: id name writer_id