Search Postgresql Archives

Re: Finding uniques across a big join

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 30, 2005 at 20:44:30 -0500,
  "John D. Burger" <john@xxxxxxxxx> wrote:
> 
> That changes the semantics of what I want.  If I group by personID 
> above, then every FOUR-way combo is of course unique.  What I'd like to 
> do is group by the three attributes, and select for personID as well.  
> But of course you can't select for columns you haven't grouped by.

Assuming that personID is an ordered type, you can select max(personID)
in the GROUP BY and save the join at the end.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux