Esto suena como un caso de uso clásico para EXISTS
operador:
SELECT *
FROM mytable a
WHERE EXISTS (SELECT 1
FROM mytable b
WHERE a.foreignkey = b.foreignkey
AND trainer IS NOT NULL
AND trainer <> 'FREE'
EDITAR:
Si solo desea las distintas foreignkey
diferentes s:
SELECT DISTINCT foreignkey
FROM mytable a
WHERE EXISTS (SELECT 1
FROM mytable b
WHERE a.foreignkey = b.foreignkey
AND trainer IS NOT NULL
AND trainer <> 'FREE'