From: Gaetano Mendola <mendola@bigfoot.com>
To: pgsql-sql@postgresql.org
Subject: Re: Select the max on a field
Date: Thu, 12 Sep 2002 15:15:57 +0200
Message-ID: <alq427$2ta2$1@news.hub.org> (raw)
References: <alq3mr$2s7o$1@news.hub.org>
"Gaetano Mendola" <mendola@bigfoot.com> wrote in message
news:alq3mr$2s7o$1@news.hub.org...
> Hi all,
>
> Suppose that I have a table like this:
>
>
> att_1 | att_2 | att_3 | att_4
> --------------------------------
> 1 | a | y | y1
> 2 | b | y | y2
> 3 | a | xx | y3
> 4 | c | zz | y4
> 5 | a | t | y5
> 6 | c | x | y6
>
>
>
> I want obtain all row that have for each att_2
> the max of att_1
I forgot to say: "with a single total query without sub select "
Ciao
Gaetano
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: mendola@bigfoot.com
Subject: Re: Select the max on a field
In-Reply-To: <alq427$2ta2$1@news.hub.org>
* 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