How to Calculate Total Invoice Amounts from Invoice Items Using Xano

Hi
I will really appreciate if anyone can help me with this

I have two tables: one for invoices and another for invoice items.
Each invoice in the invoice table can have multiple invoice items associated with it in the invoice items table.

I want to calculate the total amount for each invoice in the invoice table, which is the sum of all the amounts of its associated invoice items from the invoice items table. How can I perform this calculation?

Preferably in the GET ENdpoint
Thank you

1
8 replies