Avoiding double counting values when aggregating tables used in joins – Postgresql
I have two tables that have a parent/child relationship, where one record in the parent table may correspond to N records in the child. Both tables have an amount column that I want to aggregate in one query, so I…