I have two tables. Person and Answers. The Person table has the column person_id. The Answers table contains person_q_id, person_id, question_id, value, answer_date, questionnaire_id. What I need to find out, are person_id's that don't have an entry for a certain question_id in the Answers table. So for example, I want to find participants that haven't answered question id Q_1. I have the following:
person_q_id person_id question_id value answer_date questionnaire_id
1 101 Q_1 Yes 20150601 I-1
2 101 Q_2 Yes 20150601 I-1
3 103 Q_2 No 20150508 I-2
4 103 Q_3 Yes 20150508 I-3
So, the query would return 102 and 103. Any ideas?