A Database Error Occurred

Error Number: 3065

Expression #1 of ORDER BY clause is not in SELECT list, references column 'accesmg_sipp311.dataumumweb.tglPendaftaran' which is not in SELECT list; this is incompatible with DISTINCT

SELECT DISTINCT YEAR(tglPendaftaran) as tahun FROM dataumumweb ORDER BY tglPendaftaran DESC

Filename: /var/www/html/sipp311/models/perkara/statistik_m.php

Line Number: 23