Skip to main content
removed fluff
Source Link
Martin F
  • 9k
  • 38
  • 60

Try something like this

SELECT DISTINCT ON (boundary.id) boundary.*
FROM boundary, location
WHERE ST_Intersects (boundary.geom, location.geom)

[paul ramsey made an improvement, but forgot the I in ID]

Try something like this

SELECT DISTINCT ON (boundary.id) boundary.*
FROM boundary, location
WHERE ST_Intersects (boundary.geom, location.geom)

[paul ramsey made an improvement, but forgot the I in ID]

Try something like this

SELECT DISTINCT ON (boundary.id) boundary.*
FROM boundary, location
WHERE ST_Intersects (boundary.geom, location.geom)
added 26 characters in body
Source Link
Alexandre Neto
  • 14.4k
  • 2
  • 59
  • 85

Try something like this

SELECT DISTINCT ON (boundary.id) boundary.*
FROM boundary, location
WHERE ST_Intersects (boundary.geom, location.geom)
SELECT DISTINCT ON (boundary.id) boundary.*
FROM boundary, location
WHERE ST_Intersects (boundary.geom, location.geom)

[paul ramsey made an improvement, but forgot the I in ID]

Try something like this

SELECT DISTINCT ON (boundary.id) boundary.*
FROM boundary, location
WHERE ST_Intersects (boundary.geom, location.geom)

[paul ramsey made an improvement, but forgot the I in ID]

Try something like this

SELECT DISTINCT ON (boundary.id) boundary.*
FROM boundary, location
WHERE ST_Intersects (boundary.geom, location.geom)

[paul ramsey made an improvement, but forgot the I in ID]

fixed possibly confusing typo
Source Link
Martin F
  • 9k
  • 38
  • 60

Try something like this

SELECT DISTINCT ON (boundary.did) boundary.*
FROM boundary, location
WHERE ST_Intersects (boundary.geom, location.geom)

[paul ramsey made an improvement, but forgot the I in ID]

Try something like this

SELECT DISTINCT ON (boundary.d) boundary.*
FROM boundary, location
WHERE ST_Intersects (boundary.geom, location.geom)

Try something like this

SELECT DISTINCT ON (boundary.id) boundary.*
FROM boundary, location
WHERE ST_Intersects (boundary.geom, location.geom)

[paul ramsey made an improvement, but forgot the I in ID]

testing the id will be faster than testing the whole row
Source Link
Paul Ramsey
  • 20k
  • 2
  • 49
  • 58
Loading
Source Link
Martin F
  • 9k
  • 38
  • 60
Loading