SELECT a.*, c.*
FROM jobs a
INNER JOIN
(
SELECT jobID, MAX(time) maxVal
FROM purchaseOrders
GROUP BY jobID
) b ON a.jobID = b.jobID
INNER JOIN purchaseOrders c
ON c.jobID = b.JobID AND
c.time = b.maxVal