Re: Select groupping by one column - Mailing list pgsql-general

From Josué Maldonado
Subject Re: Select groupping by one column
Date
Msg-id 3FE23994.4090903@lamundial.hn
Whole thread Raw
In response to Re: Select groupping by one column  (Bruno Wolff III <bruno@wolff.to>)
List 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 by date:

Previous
From: Andrei Ivanov
Date:
Subject: Re: How to navigate tree without CONNECT BY?
Next
From: "John Sidney-Woollett"
Date:
Subject: Re: Replication