| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Urgent help on SQL
try this ...
select a.route, a.available, a.capacity from table_a a where a.route = 11 and rownum < 1 and a.available = ( select min(b.available) from table_a b where b.route = a.route group by b.route );
hope this solves your problem ... pls reply
regards,
jayadas
> > >>Given the following table
> > >>
> > >>table_a
> > >>
> > >>route available capacity
> > >>
> > >>11 1200 3000
> > >>11 1400 2000
> > >>11 900 5000
> > >>
> > >>I need a query that will return a single row that has the minimum
> > >>"available"
> > >>value of the three rows and the corresponding "capacity".
> > >>
Received on Sat Jul 26 1997 - 00:00:00 CDT
![]() |
![]() |