I have My db one row that I have obtain with a query:
DATE_START DATE_END
31/12/2014 07/07/2018
I need to extract every years between date_start
and date_end
My purpose is obtain this:
year
2014
2015
2016
2017
2018
I do this
SELECT LISTAGG(extract(year from TO_DATE(DATE_START,'dd-MM-yyyy')) ) WITHIN GROUP ( order by oo.DATE_START )
from STUDENT oo
WHERE
...
the problem is the query return me only a value and not the five values that I want. Anyone can help me?