Workaround for rollup on computed column in PostgreSQL

Hello

I have a postgresql data source.

I have an invoicing system with a parent record (the invoice) and child records (the line items). The line items include a quantity, unit price and a total price, which is a function of quantity * unit price.

I need to sum up the ‘total price’ for each line item at the parent level.

What is the best workaround for this? Is there a way in Postgresql to create a total_price column in the child item that performs the maths I want, then presumably I can roll this up in Glide as it is not a computed column?

Or do I need something more complicated at the parent level in Postgresql (and if so, I have no idea where to start!).

Thanks in advance!

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.