does anyone know if there is a equivalent prisma f...
# orm-help
l
does anyone know if there is a equivalent prisma feature to this sql query? I tried to use ''aggregate'' but didn't suceeed, here it shows aggregations but without calculations https://www.prisma.io/docs/concepts/components/prisma-client/aggregation-grouping-summarizing
Copy code
SELECT SUM(p.amount * p.value) FROM products p WHERE p.id_tenant = 1;
1
a
Hey Luan, This is not possible with Prisma, you would need to do the calculation in a separate query first. Feel free to open a feature request if you would like to see us add this functionality.
👍 1
1