Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

counting the frequency of a link_id

Status
Not open for further replies.

gregsa

Programmer
Jun 22, 2001
7
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top