DECLARE @Words TABLE ( Word1 VARCHAR(100), Word2 VARCHAR(100))
INSERT @Words VALUES
( 'Ромашка', 'Песня' ),
( 'Романс', 'Первый' ),
( 'Роман', 'Пень' ),
( 'Ромашка', 'Роза' ),
( 'Песня', 'Ромашка'),
( 'Город', 'Ромашка'),
( 'Городки', 'Романс' ),
( 'Роман', 'Лес' ),
( 'Город', 'Лось'),
( 'Песок', 'Лес' )
SELECT *
FROM @Words AS Wrd
JOIN ( SELECT LEFT( Word1, 4 ) AS Word4
FROM @Words
GROUP BY LEFT( Word1, 4 )
HAVING COUNT(*) > 1 ) AS Wrd4
ON Wrd4.Word4 = LEFT( Word1, 4 )
JOIN ( SELECT LEFT( Word2, 2 ) AS Word2
FROM @Words
GROUP BY LEFT( Word2, 2 )
HAVING COUNT(*) > 1 ) AS Wrd2
ON Wrd2.Word2 = LEFT( Wrd.Word2, 2 )