Hey prisma team, first of thanks for the library. ...
# orm-help
h
Hey prisma team, first of thanks for the library. It is awesome. however I am wondering how to implement this specific count. Let's say a team has taskboards and each board has items. How would I go about getting the count of incomplete items for a single team
1
Ok asking is answering.. turns out I was overthinking the way to query the data:
Copy code
return await prisma.task.count({
      where:{
        completed: false,
        AND: {
          Tasklist: {
            teamId: team.id
          }
        }
      },
    })
This is sufficient already ;-)
fast parrot 1
👍 1