Sobes.tech
Junior — Senior

SQLAlchemy query: select authors with more than five books

livecode

Task condition

You need to get a list of all authors who have written more than five books. Use the Author and Book models for this. The Author model has fields id and name, and the Book model has fields id, name, and author_id, where author_id is a foreign key referencing Author. Formulate the query using SQLAlchemy.


Author:
    id
    name

Book:
    id
    name
    author_id