postgres:在对称

mklgxw1f  于 2021-07-24  发布在  Java
关注(0)|答案(1)|浏览(275)

我试图过滤出数据点的基础上使用坐标 BETWEEN SYMMETRIC 如以下查询:

SELECT user_id
    , duration
    , distance
    , speed
   FROM trips_metrics
  WHERE lat_start BETWEEN SYMMETRIC (39.45 AND 40.05) AND lat_end  BETWEEN SYMMETRIC (39.45 AND 40.05)
     AND lon_start BETWEEN SYMMETRIC (115.41667 AND 117.5) AND lon_end BETWEEN SYMMETRIC (115.41667 AND 117.5)

ERROR:  syntax error at or near "BETWEEN"
LINE 6: ... BETWEEN SYMMETRIC (39.45 AND 40.05) AND lat_end  BETWEEN SY...

仅使用地理区域过滤用户的行程。

cwtwac6a

cwtwac6a1#

不要用括号。所以:

lat_start BETWEEN SYMMETRIC 39.45 AND 40.05

当然,你的价值观已经很好了,所以 SYMMETRIC 对于您的查询来说是多余的。

相关问题