var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Penultimate date from a list
I am very new to informix and am looking for some help
I need to know how to find the right syntex to find the penultimate date from a list
I can find the maximum date: Select MAX(datetime) maximum_date
I am thinking that i need to use the MAX function again to find the penultimate date from the same list but am unsure of the correct way to right it
Would I write it in the Select statement as something like MAX(datetime)-1?
Does anyone have any ideas?
First, do you know how to do it on any other database?
And what happens if there are two equal dates? For example:
Which one should be returned? Or is this scenario impossible? If in the example above the last row would be selected, than another subquery selecting the max(date_field) ... WHERE date_field < (select max(date_field) could be used (although I fear for the performance)