I'm not sure. If you are using mysql or postgres then it's pretty simple to do groupBy queries on the database. Prisma has an execute raw sql queries feature now, but it isn't fully documented, just says "coming soon". There is plan to have an aggregations api to allow many of the things like max, min and groupBy that are pretty easy to do in SQL but it is just a plan at this point @CCBCodeMonkey