【发布时间】:2020-04-26 01:31:55
【问题描述】:
我正在尝试获取每个区域最高点的高度,我写了这个查询,它工作正常:
select max(obstacle.valhgt_ft)
from obstacle,
obstacle_buffer
where st_contains (obstacle_buffer.geom,obstacle.geom)
group by obstacle_buffer.primary_id
但是当我尝试使用此查询更新属性时,“组”附近出现语法错误
UPDATE obstacle_buffer
SET max_valhgt_ft = max(obstacle.valhgt_ft)
from obstacle,
obstacle_buffer
where st_contains (obstacle_buffer.geom,obstacle.geom)
group by obstacle_buffer.primary_id
【问题讨论】:
标签: postgresql group-by sql-update postgis