Bård
09/21/2021, 10:00 AMconst result = await prisma.profile.findMany({
distinct: ['schoolKey', 'sex'],
where: {
user: {
emailVerified: {
not: null,
},
},
},
select: {
_count: {
sex: true
},
},
});
I'm getting the error:
Unknown field _count for select statement on model Profile.Ryan
09/21/2021, 10:34 AMcount with distinct at the moment. It would be great if you could add a 👍 to this request and also check the workaround specified in the form of a raw query 🙂Bård
09/21/2021, 10:46 AM