Re: howto/min values

Поиск
Список
Период
Сортировка
От Sjors
Тема Re: howto/min values
Дата
Msg-id 002b01c2ee29$4c57d690$04a779d9@cc299057a
обсуждение исходный текст
Ответ на Re: howto/min values  (Christoph Haller <ch@rodos.fzk.de>)
Список pgsql-sql
> >
> 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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Victor Yegorov
Дата:
Сообщение: Re: vacuum all but system tables
Следующее
От: cliff@cliffmeyers.com
Дата:
Сообщение: integrity of column used to order rows