Re: MAX without FROM

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Angshu Kar <angshu96(at)gmail(dot)com>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: MAX without FROM
Date: 2006-01-12 19:09:30
Message-ID: 1137092970.3959.18.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2006-01-12 at 12:58, Angshu Kar wrote:
> Hi,
>
> Can I use Select max(a field returned from another query)?
> say, another query returns say 10,1,2,3,6,7

Does this form help you:

select max(a) from (select 1 as a union select 2 union select 3) as b;

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Angshu Kar 2006-01-12 19:14:33 Re: MAX without FROM
Previous Message Jeff Trout 2006-01-12 18:58:12 Re: Plans for 8.2?