Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Help With A Select

Re: Help With A Select

From: Gary Assa <gsa_at_panix.com>
Date: 1997/07/23
Message-ID: <5r5t6l$e5b@panix.com>#1/1

>route available capacity
>
>11 1200 3000
>11 1400 2000
>11 900 5000
>
>I wrote the following query that returns '900', but how can I get the '5000'
>that goes along with it?
>
>SELECT route, MIN(available)
>FROM table_a
>WHERE route=11
>GROUP BY route;
>

select * from table_a where (route,available) in (select route, MIN(available)

     from table_a WHERE route=11 GROUP BY route);

-- 
                     ------------------------------------
If you have a condom and sunscreen SPF 15 or greater, than it's safe to look at
                     http://www.panix.com/~gsa/index.html
Received on Wed Jul 23 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US