This is my code:
select datepart(year,fechaingreso) as ingreso, count(*)
from empleados
group by datepart(year,fechaingreso);
And it gives me the following error:
ORA-00904: "DATEPART": identificador no válido
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Error en la línea: 132, columna: 12
What or where is the error in my code please?