Error: Expression #1 of ORDER BY clause is not in SELECT list, references column 'awnrg_data.news.article_date' which is not in SELECT list; this is incompatible with DISTINCT from SQL: SELECT DISTINCT YEAR(article_date) FROM news WHERE publish = 'Yes' ORDER BY article_date DESC