Exercise 1: Combining Filters and Sorting — Possible Solution =============================================================== const weekAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000); const posts = await prisma.post.findMany({ where: { published: true, OR: [ { viewCount: { gte: 50 } }, { publishedAt: { gte: weekAgo } }, ], NOT: { slug: { startsWith: "draft-" } }, }, orderBy: [{ viewCount: "desc" }, { title: "asc" }], }); How it reads: - published: true, the OR block and the NOT block sit side by side at the top level, so a post must satisfy all three. - Inside OR, a post needs to satisfy only one of the two conditions. - orderBy is a list, so posts are sorted by viewCount first; title only decides the order between posts with the same view count. WHY THIS WORKS AS AN ANSWER ------------------------------ It uses the structure the chapter describes — ANDed top-level conditions containing an OR list and a NOT — and calculates "7 days ago" in code rather than hard-coding a date.