## Problem We support ordering by a relation field, but not order by a relation aggregate. For example: get all users, order by post count. ```ts prisma.user.findMany({ orderBy: { posts: { count: 'asc' } } }) ``` ## Additional context <!-- Add any other context or screenshots about the feature request here. --> - same request but for groupby: https://github.com/prisma/prisma/issues/5464 - order by relation field: https://github.com/prisma/prisma/issues/5008
Problem
We support ordering by a relation field, but not order by a relation aggregate.
For example: get all users, order by post count.
Additional context