Для SQL Server 2005 +:
WITH cteMaxDates AS (
SELECT sub_id, ref_id, log_type, MAX(log_stamp) AS MaxDate
FROM Table2
GROUP BY sub_id, ref_id, log_type
),
cteRecipient AS (
SELECT md.sub_id, md.ref_id, md.log_type, md.MaxDate, t2.Recipient
FROM cteMaxDates md
INNER JOIN Table2 t2
ON md.sub_id = t2.sub_id
AND md.ref_id = t2.ref_id
AND md.log_type = t2.log_type
AND md.MaxDate = t2.log_stamp
)
SELECT t1.Name, t1.ref_id,
start.MaxDate AS start_date,
start.Recipient AS start_recipient,
comment.MaxDate AS latest_comment,
comment.Recipient AS comment_recipient,
complete.MaxDate AS completion_date,
complete.Recipient AS completion_recipient
FROM Table1 t1
LEFT JOIN cteRecipient start
ON t1.sub_id = start.sub_id
AND t1.ref_id = start.ref_id
AND start.log_type = 1
LEFT JOIN cteRecipient comment
ON t1.sub_id = comment.sub_id
AND t1.ref_id = comment.ref_id
AND comment.log_type = 2
LEFT JOIN cteRecipient complete
ON t1.sub_id = complete.sub_id
AND t1.ref_id = complete.ref_id
AND complete.log_type = 3