| From: | Angshu Kar <angshu96(at)gmail(dot)com> |
|---|---|
| To: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
| Cc: | pgsql general <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: MAX without FROM |
| Date: | 2006-01-12 19:14:33 |
| Message-ID: | df8328740601121114w7ac2ad0ctdac45afc695a907f@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
What are 1 ,2 and 3 in your query?
Here is my inner query which returns a set of min values. I want to get the
max out of the returned mean values...
select min(evalue) as M from distance where query_id
in (select entry_id from partition where partition = 849)
On 1/12/06, Scott Marlowe <smarlowe(at)g2switchworks(dot)com> wrote:
>
> 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;
>
--
Ignore the impossible but honor it ...
The only enviable second position is success, since failure always comes
first...
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Scott Marlowe | 2006-01-12 19:22:54 | Re: MAX without FROM |
| Previous Message | Scott Marlowe | 2006-01-12 19:09:30 | Re: MAX without FROM |