Search Postgresql Archives

Re: Selecting All Columns Associated With Maximum Value of One Column

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

 



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

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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