Relative Content

Tag Archive for mysqlprismanext.js13

In prisma orderBy _count cant take where clause

Problem Currently, if I try to sort users based on number of posts they have below is the query to be executed. const getUsers = await prisma.user.findMany({ take: 10, orderBy: { posts: { _count: ‘desc’, }, }, }) But, if I want to sort users based on number of posts who have a postname as […]