and I want to see the years that I have in my database in which I have entered data. Example in the database I entered dates in 2016 2017 2018 and the query that shows me the values 2018 - 2017 - 2016. I have the following query but it does not work very well.
SELECT fecha FROM decreto WHERE fecha IN ( SELECT fecha FROM decreto GROUP BY fecha HAVING count( fecha ) >1 ) ORDER BY fecha
I hope I can explain myself well