I have a relational database with three tables. The first containts id\'s that relate to the second. The second contains id\'s that relate to the third. The third contains the r
SELECT `t3`.`id`
FROM `table3` `t3`
LEFT JOIN `table2` `t2`
ON `t3`.`foreign_id` = `t2`.`id`
LEFT JOIN `table1` `t1`
ON `t2`.`foreign_id` = `t1`.`id`
WHERE `t1`.`id` = 'some_id'