I have following query :
SELECT DISTINCT TOP (50) fms.score, t1.column1, t2.column1 FROM table1 t1 JOIN table1 t2 ON t1.column1 < t2.column1 CROSS APPLY (S