I have a problem in a Query in MySQL, I currently have two tables, one of employees and one of places visited by that employee by date, the goal is to obtain through a query the list of all employees and the last place they visited, so far so good, the problem is that some employees have no movement and therefore I can not include them in my final result, I will attach images of my tables and my current query, I hope you can support me. Thank you very much.
The Query used is the following:
SELECT tblempleados.Id AS idEmp,
tblempleados.Nombre AS NombreEmpleado,
tblmovimientos.Id AS IdUltimoMov,
tblmovimientos.Area,
tblmovimientos.FechaMovimiento AS Fecha,
tblmovimientos.IdCargo as idCargo
FROM (bd_secjo.tblmovimientos
inner JOIN bd_secjo.tblempleados ON tblempleados.Id=tblmovimientos.IDEmpleado)
WHERE tblmovimientos.FechaMovimiento
IN (SELECT MAX(FechaMovimiento) FROM bd_secjo.tblmovimientos GROUP BY IdEmpleado)