Haber prueba lo siguiente
Código SQL:
Ver originalSELECT Route, Version, Leg, DATE, MIN(TIME) AS inicial, MAX (TIME) AS final
(SELECT r.ruta AS Route,v.version AS Version,l.leg AS Leg,CONVERT(DATE,e.fecha_agendada,105) AS DATE,CONVERT(VARCHAR,e.fecha_agendada,108)AS TIME
FROM d_rutas AS r
INNER JOIN d_versiones AS v ON r.id=v.id_ruta
INNER JOIN d_legs AS l ON l.id_version=v.id
INNER JOIN d_paradas AS p ON p.id_leg=l.id
INNER JOIN d_eventos AS e ON e.id_parada=p.id
LEFT JOIN tm_transfer_bodegas AS tb ON tb.id_Bodega=p.id_bodega
WHERE tb.nombre='TTL' AND v.STATUS='A'
GROUP BY r.ruta,v.version,l.leg,e.fecha_agendada)
GROUP BY Route, Version, Leg, DATE