I have a data in my db, like:
2016-05-17 , 2015-05-20 , 2015-02-02
I want to get only the years to create a list, like:
2016 , 2015
I'm making this:
SELECT * FROM insercao GROUP BY SUBSTR(data,0,4)
But this return only:
2015
How can I return All not duplicated years?