Puede usarlo en otra consulta así:
SELECT M.*, P.* FROM
(
SELECT GROUP_CONCAT(p1.id) _fid, GROUP_CONCAT(p2.id) _mid, count(1)
FROM new_person AS pb
INNER JOIN new_person AS p1 ON pb.father_id = p1.id
INNER JOIN new_person AS p2 ON pb.mother_id = p2.id
WHERE (
p1.last_name <> 'N.N.'
AND p1.last_name <> '')
OR (p2.last_name <> 'N.N.'
AND p2.last_name <> '')
GROUP BY p1.first_name, p1.last_name, p2.first_name, p2.last_name
HAVING COUNT(1) > 1
) AS M INNER JOIN new_person as p ON M._fid = p.id
Observe que agregué la consulta completa a la instrucción from con el alias como M
. A continuación, puede JOIN
M
a otra mesa o haz lo que quieras desde allí.