Hi,
This is probably a very simple problem, but I'm fairly new to SQL. Any help you can provide is greatly appreciated.
I have two tables (QUESTION and ANSWER). The ANSWER table is linked to the QUESTION table as QUESTION.id = ANSWER.question_id. What I need to do is return a bunch of fields from the QUESTION table along with the number of answers for that particular question. There may be no or many entries in the ANSWER table for a particular QUESTION entry.
So, in summary, I would like to return, say, the QUESTION.name field + the number of times it has been answered.
Thanks,
Greg
This is probably a very simple problem, but I'm fairly new to SQL. Any help you can provide is greatly appreciated.
I have two tables (QUESTION and ANSWER). The ANSWER table is linked to the QUESTION table as QUESTION.id = ANSWER.question_id. What I need to do is return a bunch of fields from the QUESTION table along with the number of answers for that particular question. There may be no or many entries in the ANSWER table for a particular QUESTION entry.
So, in summary, I would like to return, say, the QUESTION.name field + the number of times it has been answered.
Thanks,
Greg