pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: bulk@colonnello.org
To: pgsql-sql@postgresql.org
Subject: Re: Simple Query HELP!!!
Date: 23 Sep 2001 10:49:27 -0700
Message-ID: <a27df63d.0109230949.4917f46f@posting.google.com> (raw)
References: <a27df63d.0109221818.2347f039@posting.google.com>
	<3bad5086.29922681@news.charter.net>

reb_01501@yahoo.com (Bob Barrows) wrote in message news:<3bad5086.29922681@news.charter.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



view thread (5+ messages)  latest in thread

Message-ID: <a27df63d.0109230949.4917f46f@posting.google.com>
Permalink:  ../a27df63d.0109230949.4917f46f@posting.google.com/
Also on:    postgresql.org/message-id/a27df63d.0109230949.4917f46f@posting.google.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bulk@colonnello.org
  Subject: Re: Simple Query HELP!!!
  In-Reply-To: <a27df63d.0109230949.4917f46f@posting.google.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox