Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Verketten von Joins zurück zur Zieltabelle

SELECT  ra.*
FROM    responses rd
JOIN    responses ra
ON      (ra.id_s, ra.id_p) = (rd.id_s, rd.id_p)
WHERE   (rd.id_q, rd.answer) = (3, 'D')