Query help request

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
 
G

Greg Denehy

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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Help ! 8
Help with multiple count query 1
Union Query of Two Queries (Part 2) 2
Help with building update query with two tables 2
Query - group by question 2
Joins? 1
query problems 5
Problem with UNION Query 5

Top