How to select the records for the 3 recent years, with JUST considering the year instead of the whole date dd-mm-yy.
let's say this year is 2013, the query should display all records from 2013,2012 and 2011.
if next year is 2014, the records shall be in 2014, 2013, 2012
and so on....
table foo
ID DATE
----- ---------
a0001 20-MAY-10
a0002 20-MAY-10
a0003 11-MAY-11
a0004 11-MAY-11
a0005 12-MAY-11
a0006 12-JUN-12
a0007 12-JUN-12
a0008 12-JUN-12
a0009 12-JUN-13
a0010 12-JUN-13