I have the following tables:
I want to select all the questions from table RelCo_Question where there are no corresponding records in RelCo_Answer with RelCo_Respondent equal to a certain value (objectId).
Can this be done in a single SQL query? Or do I need to fetch all questions first, and then fetch all potential answers for that given objectId and remove all answered questions?
I think the following query should do it:
RelCo_Answer[RelCo_Question].RelCo_Respondent.objectId not in (RelCo_Respondent[objectId = 'OBJECT ID OF RESPONDENT'].objectId)
When trying your suggestion there @mark-piller, I get way to many responses…
I have 70 questions in the RelCo_Question table. What I want is to see the subset of these 70 that are missing an answer (RelCo_Answer) from a specific respondent (RelCo_Respondent)…
Maybe I solved it by myself for once - I think maybe this query gives me the result I want:
objectId not in (RelCo_Answer [RelCo_Respondent='OBJECT ID OF RESPONDENT'].RelCo_Question.objectId)
Just have to verify it a bit more…