Exercise 2: Filtering by Relations — Possible Solution ======================================================== (a) Tags that aren't used on any post await prisma.tag.findMany({ where: { posts: { none: {} } }, }); none: {} means "no related post matches an empty condition" — in other words, no related posts at all. (b) Authors with at least one post tagged "prisma" await prisma.user.findMany({ where: { posts: { some: { tags: { some: { name: "prisma" } } } }, }, }); Relation filters can be nested: a user with some post, which has some tag named "prisma". (c) Users who have posts, all of them published await prisma.user.findMany({ where: { posts: { some: {}, // has at least one post every: { published: true }, // and every post is published }, }, }); Without `some: {}`, `every` alone would also return users with no posts, because an empty list has no post that breaks the rule. WHY THIS WORKS AS AN ANSWER ------------------------------ It uses none, nested some, and every — including the empty-list trap the chapter warns about, which (c) is designed to catch.