hi Cristian Chaparro A.
You have a problem in the join part of your query. In the JPA you can't use
your structure(You can but it is not so simple as join :)).
For more information look here
Your query will be looks like :
SELECT e FROM EstadisticoRD e inner join e.codOficina as o inner
join e.depto as d ...