The following renders the correct output.
(
SELECT
answer_data
FROM
wp_learndash_pro_quiz_statistic_ref b, wp_learndash_pro_quiz_statistic bb
WHERE
wp_users.id = b.user_id
AND b.statistic_ref_id = bb.statistic_ref_id
AND bb.question_id = 82
AND b.quiz_id = 9) AS "xyz"
But, when I change bb.question_id = 82 to any other question_id (i.e. 56 is another question) I get this error:
" MySQL said: Documentation #1242 - Subquery returns more than 1 row"
Any idea what I'm doing wrong?