Prisma · Pipe
distinct
Use Prisma Client's distinct option to remove duplicate records by one or more fields. Combine it with where to filter records and select to control the returned fields.
Last updated
Syntax
await prisma.user.findMany({ distinct: ["city", "country"] })In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
findManyfindFirstselectwherenativeDistinctUserDistinctFieldEnum