Hola, necesito unir estas dos consultas:
Código:
select id, nombre, apellidos from arbol where id in (17);
Con esta consulta obtengo el nombre y apellidos de la mujer o mujeres de un hombre
Código:
select fecha from matrimonio
where (idhombre = 16 or idmujer = 16)
and (idhomnbre = 17 or idmujer = 17);
Con esta obtengo la fecha de matrimonio, que la guardo en otra tabla
Código:
select fecha from matrimonios where
(idhombre = 16 or idmujer = 16) and
(idhombre in (select id, nombre, apellidos from arbol where id in (17))
or idmujer in (select id, nombre, apellidos from arbol where id in (17)));
Quiero obtener el nombre/s de la pareja y la fecha/s de casamiento. Pero no estoy seguro de como hacerlo, gracias
bichomen