This question is asked by an interviewer and i am unable to figure out since so many days.
I have a tableĀ employee like
name
| salery | date | increment |
---|
jhon | 10000 | 20-Aug-2009 | 0 |
jhon | 15000 | 31-Sep-2013 | 5000 |
jhon | 18000 | 22-Jan-2015 | 3000 |
jhon | 20000 | 12-Feb_2016 | 2000 |
| | | |
Now i need a query where i give some random date as input and it should produce employee salary on that date as output.
example: input date = 12-Jun-2015 (which is actually not in the table)
now the output should be salary on that date.
I am unable to figure out how to give random date which is not in table as input.
Could anyone please help me to solve this?