Ver originalSELECT val1, val2 FROM tabla INNER JOIN (SELECT val2, COUNT(*) total FROM tabla GROUP BY val2 HAVING total = 1)t1 ON tabla.val2 = t1.val2