> >
> No, not at all. Something like
>
> select p.points, p.id, p.distance from
> (select points, id, (x-x) as distance from table) as p
> where p.distance = (select min(p1.distance)
> > from table as p1
> > where p.points=p1.points)
> > order by p.points, p.id ;
>
> should do the trick.
> The FROM clause allows any kind of subqueries within parentheses.
>
> Regards, Christoph
>
Thanks, this is the solution.
greetz Sjors