SELECT last date from multiples values
Because no sample data was given, the next query is untested:

SELECT
    ID_log,
    fecha_gestion,
    nitsec
FROM table t1
WHERE NOT EXISTS (SELECT 1 FROM table t2 WHERE t2.nitsec = t1.nitsec and t2.fecha_gestion &lt; t1.fecha_gestion)