Subject Re: second most recent value
Author csswa
--- In ib-support@y..., Duilio Foschi <dedalus@y...> wrote:
> "select first 1 qty from Table1 order by d_mov desc"
>
> However, I want the _second_ most recent QTY value.

Answer:
select first 1 skip 1 qty from Table1 order by d_mov desc

From manual, use of FIRST:
SELECT [FIRST (<integer expr m>)] [SKIP (<integer expr n>)]

Retrieves the first m rows of the selected output set. The optional
SKIP clause will cause the first n rows to be discarded and return an
output set of m rows starting at n + 1.

Regards,
Andrew Ferguson
-- As mentioned in Revelations.