Re: JOIN

Поиск
Список
Период
Сортировка
Искать
От
Richard Huxton
Тема
Re: JOIN
Дата
Msg-id
4665537A.2060601@archonet.com
Ответ на
Re: JOIN (Loredana Curugiu)
Список
Дерево обсуждения
Re: JOIN "Oliveiros Cristina" <oliveiros.cristina@marktest.pt>
Re: JOIN "Loredana Curugiu" <loredana.curugiu@gmail.com>
Loredana Curugiu wrote:
> Any help, please?


>> So  I have the following query:
>>
>>        SELECT SUM(A.count),
>>                      A.theme,
>>                      A.receiver,
>>                      A.dates
>>           FROM my_table A
>> INNER JOIN my_table B
>>               ON A.theme=B.theme
>>             AND A.receiver=B.receiver
>>             AND A.date=ANY(B.dates)
>>  GROUP BY A.theme,A.receiver, A.dates;
[snip]
>>
>> The result is wrong. I don't know what it is wrong at my query.
>> Please help.

You don't actually say what's wrong. What are you expecting as output?

Oh, and your "date" column isn't - it's a timestamp with time-zone. That 
might or might not cause confusion with daylight-saving-times.

--   Richard Huxton  Archonet Ltd

В списке pgsql-sql по дате отправления
От: Loredana Curugiu
Дата:
Сообщение: Re: JOIN
От: Loredana Curugiu
Дата:
Сообщение: Re: JOIN
FAQ