huv1k
03/22/2021, 7:51 AMgroupBy
queries grouped by FK π€ Example
await prisma.post.groupBy({
by: ['userId'],
sum: {
likes: true,
},
})
So we can get/select user
in this query instead of running another query for users π€Ryan
03/22/2021, 10:29 AMhuv1k
03/22/2021, 10:33 AM