I've got the following table structure.
Table 1
id Value start_date
1 1000 09-05-2010
2 2000 10-05-2011
3 3000 11-05-2012
4 4000 17-05-2013
5 5000 18-05-2014
Looking at this table, I would like to know which value (which will be 3000) will be the correct one for a record in another table with date 01-01-2013.
My challenge is that I'm not able to define which is the last date before the given one (01-01-2013 in my example).
Thanks!