I am looking to do an update query to one table (munparcel_zoning) with the sum of values from a column in another table (permability.permarea) where the type (permtype) is equal to a value (impervious). As this is a many-to-one, I am thinking I need a group by (parcelid). As there are two tables involved I am thinking the best way is to do an inner join, using parcelid = parcelid from each table. However, I am having issues with the query executing.
UPDATE munparcel_zoning
SET imperv =
(SELECT Sum(permability.permarea)
FROM permability
WHERE permability.permtype = 'impervious'
GROUP BY permability.parcelid)
INNER JOIN munparcel_zoning
ON permability.parcelid = munparcel_zoning.parcelid;