I have two unsigned int fields in my DB. I want to run a query that returns a division between those fields using Prisma ORM.
SELECT CAST (COALESCE(total_1/count_1, 0) + COALESCE(total_2/count_2, 0) AS SIGNED) AS
avg_amount FROM table_name WHERE unrelated_field = x
How can I do that? I also thought of using a MySQL view for that but doesn't look like Prisma supports that either.