Skip to content

Tag: postgresql

query to update records count based on relation and constraints

Im trying to update a column (address_count) on my people table that must have the sum of records from another table (people_addresses) plus some constraints. The idea is that, the record on people must exist on people_addresses and must be present on at least one of the other tables (table a, table b) With t…