.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY lic_ano DESC' at line 1
error: SELECT distinct lic_ano FROM licitacao WHERE licitacao.agc = ORDER BY lic_ano DESC