Re: join table with itself?

Поиск
Список
Период
Сортировка
От William Leite Araújo
Тема Re: join table with itself?
Дата
Msg-id bc63ad820703150857h2ff195b0wac18476730b19c3c@mail.gmail.com
обсуждение исходный текст
Ответ на join table with itself?  (T E Schmitz <mailreg@numerixtechnology.de>)
Ответы Re: join table with itself?
Список pgsql-sql
On 15/03/07, T E Schmitz <mailreg@numerixtechnology.de> wrote:
(...)
 
   Try join the tables.

SELECT  present.day, present.low, (MIN(future.day)-present.day) as
days2fall FROM history AS present JOIN history AS future ON ( present.day < future.day AND
     future.low <= present.low )
GROUP BY present.day,present.low
ORDER BY days2fall DESC


--
William Leite Araújo
Analista de Banco de Dados - QualiConsult

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

Предыдущее
От: T E Schmitz
Дата:
Сообщение: join table with itself?
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Alter Table