1
我需要獲取每個人使用PostGIS以多邊形形式定義的特定位置的次數。獲取動作發生的次數
這裏是我開始的SQL語句:
SELECT id_p
FROM Movement
WHERE ST_Contains('POLYGON((long1 lat1, long2 lat2, long3 lat3, long4 lat4))',
ST_MakePoint(longitude,latitude))
AND (datehour::date BETWEEN '2017-01-01' AND '2017-01-31')
AND speed = 0