Re: Simple Query HELP!!!

From: bulk(at)colonnello(dot)org (Paolo Colonnello)
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Simple Query HELP!!!
Date: 2001-09-23 17:49:27
Message-ID: a27df63d.0109230949.4917f46f@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

reb_01501(at)yahoo(dot)com (Bob Barrows) wrote in message news:<3bad5086(dot)29922681(at)news(dot)charter(dot)net>...
> Do you care about ties? What if Ingrid, 38 yrs old, worked at IBM?
> Would you want to show both Ingrid and Maria? If so, this will work:
>
> Select Name From People t1 Inner Join
> (Select Company, Max(Age) As Oldest FROM People
> Group By Company) t2
> ON t1.Company = t2.Company AND t1.Age = t2.Oldest
>

Thanks a lot, the query work perfect! I dont care about ties... this
is just the query I need...

Bye

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Kevin Way 2001-09-23 20:54:01 Re: confounding, incorrect constraint error
Previous Message Kevin Way 2001-09-23 07:09:46 confounding, incorrect constraint error