Is there a sum() function for Supabase? E.g. trying to replicate something like the following:
Copy code
SELECT SUM (amount) AS total
FROM payment
z
ziad
01/24/2022, 3:59 AM
The Supabase Client is based on PostgREST which doesn't have support for custom queries like this. You'd have to either create a view in your database, or a custom function that you can call with
supabase.rpc
m
Mattyfaz
01/24/2022, 4:07 AM
Thanks @User , I actually just resolved it by using a custom function and calling