Subject Re: [ib-support] Max value
Author Sivaraman Krishnan
hI,

This is the query,

SELECT NUMBER FROM TEST WHERE AMOUNT>=(SELECT MAX(AMOUNT) FROM
TEST WHERE AMOUNT<(SELECT MAX(AMOUNT) FROM TEST))



At 05:02 PM 18/12/2002 +0800, you wrote:
>if this this the case how do i select the max top 2 amount.
>which is 22.78 and 12.90.
>
>
>""Leyne, Sean"" <sleyne@...> wrote in message
>news:66187D861C1747499BE1365B74E0369110B4F3@......
> > > I want to get the Number for the record for which amount value is max.
> > >
> > > I have following records in my table
> > >
> > > Number Amount
> > > 1 10.89
> > > 2 12.90
> > > 3 22.78
> > > 4 7.77
> > >
> > > how do I get 3 using a sql statement.
> >
> > try,
> >
> > SELECT FIRST 1 Number from Table Order By Amount Desc
> >
> >
> > Sean
> >
> >
> > To unsubscribe from this group, send an email to:
> > ib-support-unsubscribe@egroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
> <http://docs.yahoo.com/info/terms/>http://docs.yahoo.com/info/terms/
> >
> >
> >
>
>
>
>Yahoo! Groups Sponsor
>ADVERTISEMENT
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to the
><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.