私はこのようなコードを持っています:
SELECT
`cabinet`.`name_test`,
`answers`.`answer_id`,
(
SELECT `answer_id`
FROM `answers`
WHERE `user_id` = '353281' AND `answers`.`test_id` = `cabinet`.`test_id`
) as answer_2
FROM `cabinet`
INNER JOIN `answers`
WHERE
`user_id` = '184918649'
AND `friend_id` = '353281'
AND `answers`.`test_id` = `cabinet`.`test_id`
二重に書かない方法: answers
. test_id
= cabinet
. test_id
?