Hey Avi 👋 unfortunately this is not yet supported natively in the Prisma Client API, so your hunch about dropping down to SQL for this is correct here. Nonetheless, this is a very valid use case and we’d like to support it in the future! Maybe you can
create a feature request (incl the SQL query that you use as a workaround) so that our Product and Engineering teams can evaluate this and put it on the roadmap? 🙂