Supabase database functions enquiry

I'm working on an intensive accounting-system that has more than one kind of calcluation and it's pretty hectic and complicated.

Basically whatever my client requested, I simply said "sure can be done".

I'm using Next JS with Supabase for it, I want those who have some experience to reply to this.

Would it be smarter to rely on database functions for the calculations such as sum of all income/expense or debt and these things? Rather than bringing in all the data and querying the sum in the dashboard?

So what I've done is my database functions all do the math, and return the results, the returned results are shown in my dashboard, is this good or bad practice?
Was this page helpful?