Hello,

I have a table with point_id, line_id, and distance (from point to line).
I need to create a new table with the record for the shortest distance for
each point.
I have tried:

select point_id,
line_id,
min(distance)
from worktemp.distances2streets group by point_id;

but i get the message:

ERROR:  column "distances2streets.line_id" must appear in the GROUP BY
clause or be used in an aggregate function
LINE 2: line_id,
       ^

********** Erro **********

ERROR: column "distances2streets.line_id" must appear in the GROUP BY clause
or be used in an aggregate function
Estado de SQL:42803
Carácter:18


Any suggestion?

Thanks
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to