Re: Selecting All Columns Associated With Maximum Value of One Column - Mailing list pgsql-general

From Rich Shepard
Subject Re: Selecting All Columns Associated With Maximum Value of One Column
Date
Msg-id alpine.LNX.2.00.1110060610270.26051@salmo.appl-ecosys.com
Whole thread Raw
In response to Re: Selecting All Columns Associated With Maximum Value of One Column  (Chris Curvey <chris@chriscurvey.com>)
List pgsql-general
On Wed, 5 Oct 2011, Chris Curvey wrote:

> Based on your subject line, I'm guessing that you want something like this:
>
> select quant, param, site_id, sample_date, str_name from chemistry where
> param = 'TDS' and str_name = 'BurrowCrk' and quant = (select max(quant)
> from chemistry where param = 'TDS' and str_name = 'BurrowCrk')

Chris,

   Thank you. I missed seeing the latter part.

   This returns 0 rows, but it puts me on the right track.

Rich

pgsql-general by date:

Previous
From: Robert Buckley
Date:
Subject: Re: script not working in php
Next
From: Rich Shepard
Date:
Subject: Re: Selecting All Columns Associated With Maximum Value of One Column