I've two tables
(that's a cut down version, but will do for this question)
I need to get all the responses where there is at least one answer in the answers table. But I do not want the answer data. It's literally a quick check for an export to say "get me all the responses where there's at least one question answered".
I have this:
but that's returning all the rows in the answer table. I am not interested in getting those...Code:select r.* FROM responses r JOIN task_answers ta on r.response_id = ta.response_id WHERE r.schema_id = 13 ORDER BY r.response_id ASC
.... do I need a LEFT or RIGHT, OUTER or INNER join or something?
cheers for any help!!