Re: Select groupping by one column

Поиск
Список
Период
Сортировка
От Josué Maldonado
Тема Re: Select groupping by one column
Дата
Msg-id 3FE23994.4090903@lamundial.hn
обсуждение исходный текст
Ответ на Re: Select groupping by one column  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-general
Hello Bruno,

Bruno Wolff III wrote:
>>
>>select refno, max(fecha), max(ocnum), max(pvd) from pedh
>
>
> I don't see how that could work. Maybe you left off group by. But if you
> did the aggreates could come from different rows, which might not be what
> you want.

I missed the group by 1, I'm sorry.

>
>
>>It seems to work fine, but is there another way to get the same result
>>avoing use of aggregate functions?
>
>
> You might be able to use distinct on instead of aggregates.

Thanks



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

Предыдущее
От: Andrei Ivanov
Дата:
Сообщение: Re: How to navigate tree without CONNECT BY?
Следующее
От: "John Sidney-Woollett"
Дата:
Сообщение: Re: Replication