Re: select max from subquery

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: searchelite <searchelite(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: select max from subquery
Date: 2009-02-14 11:09:12
Message-ID: 4996A658.4030508@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 14/02/2009 11:05, searchelite wrote:

> select max(foo) from (select some statement) as foo

Can you post the full query? It's very hard to tell from this.

Also, I think you may need to give the subquery an alias, thus:

select max(foo) from ( .... ) s as foo

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2009-02-14 11:25:14 Re: select max from subquery
Previous Message searchelite 2009-02-14 11:05:29 select max from subquery