usando el ejemplo que te di saldria algo como esto:
Código SQL:
Ver originalCREATE TABLE #temp
(
id INT,
id_conver INT,
SOURCE INT,
target INT,
title VARCHAR(20),
message VARCHAR(20)
)
INSERT INTO #temp VALUES (1,1,333,999,'hola','hola como estas')
INSERT INTO #temp VALUES (2,1,999,333,'hola','bien bien y tu')
INSERT INTO #temp VALUES (3,1,333,999,'hola','bien tambien')
INSERT INTO #temp VALUES (4,2,444,555,'hey','how are you')
INSERT INTO #temp VALUES (5,2,555,444,'hey','fine and you?')
INSERT INTO #temp VALUES (6,1,999,333,'hola','me da gusto')
SELECT title,message,SOURCE FROM #temp WHERE id IN (
SELECT MAX(id) FROM #temp GROUP BY SOURCE,id_conver) ORDER BY id_conver ASC