Re: Howto??

Поиск
Список
Период
Сортировка
От chester c young
Тема Re: Howto??
Дата
Msg-id 20030317185752.59785.qmail@web12702.mail.yahoo.com
обсуждение исходный текст
Ответ на Howto??  ("J.C.M. van der Kwast" <jkwast@home.nl>)
Список pgsql-sql
> I have a table with id column, another id (id2) column and a value
> column. For each id there can be more id2. I want id2 for id where
> the value is min. 
> thanks sjors

select distinct id2 from tab
where id=x and value = (select max(value) from tab where id=x)


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com


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

Предыдущее
От: "J.C.M. van der Kwast"
Дата:
Сообщение: Min values?
Следующее
От: "David Witham"
Дата:
Сообщение: parse error when calling function in plpgsql