I have two tables flickr_edin
and temmpat
.
temppat
was created using:
CREATE TABLE temppat (id serial, geom geometry);
INSERT INTO temppat (geom) VALUES (ST_GeomFromText('POINT (326253.33 674110.63)'));
flickr_edin
contains columns id
, date_taken
, user
and geom
.
I want to find out how many photos have been taken within 200m of this location in temmpat
for each day of the week.
This is my query:
SELECT COUNT(*) as count,EXTRACT('dow' FROM date_taken) as dow
FROM flickr_edin a JOIN temppat b ON ST_WITHIN(a.geom,ST_BUFFER(b.geom,200))
GROUP BY dow;
I get this error:
ERROR: contains: Operation on mixed SRID geometries (Polygon, 0) != (Point, 27700) SQL state: XX000