Query help request

  • Thread starter Thread starter Greg Denehy
  • Start date Start date
G

Greg Denehy

Hi All,
Can you please help with this query.

I have 2 tables

Question:
QuestionID - ID Feild
Qname - Name of the question


Answer:
AnswerID -ID Feild
SurveyID - ID which identifies which house it was
QuestionID - ID of the question that the answer applies to
Answerkey - the actual answer

On each surevy, there is a question that asks for the street name, and
another that asks for yes or no on whether rail noise bothers them.

I need to get a count of how many people complained about rail noise in each
street. I just can't work it out.

Can someone please help me??
Thanks
 
Dont worry about it.
I figured it out.

Thanks

SELECT (count(AnswerKey)/84*100) AS [Count], Answerkey
FROM Answer
WHERE SurveyID In (SELECT SurveyID FROM Answer WHERE AnswerKey='1' AND
Answer.QuestionID=29) And QuestionID=2
GROUP BY Answerkey;
 
Back
Top