Search Postgresql Archives

Re: Finding uniques across a big join

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

 



"John D. Burger" <john@xxxxxxxxx> writes:

> I don't know what that does.  If you mean:
> 
> select max(p2.personID), p2.eyeColor, p2.hairColor, p2.skinColor
>    from persons as p2
>    group by p2.personID, p2.eyeColor, p2.hairColor, p2.skinColor
>    having count(*) = 1;
> 
> then I don't think that works either - if I include personID in the GROUP BY,

select max(personid) as personid, eyecolor, haircolor, skincolor
  from persons
 group by eyecolor, haircolor, skincolor
having count(*) = 1

-- 
greg



[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