Question : Report tally of 30 questions 1-5 answers

Hi,
I am in need of a way to put the results of a survey:  for example, if there are 20 questions, each ranked 1-5 by 50 people.  

I need (20* 5) "counts", and I don't want to have to make 20 separate "totals" queries with groups (although I already have done this), in case it is a step toward my goal.  

I need to create a report: which fills in the count of answers of each type.  
Question #            5        4         3        2       1      0
Queston 1
Question 2
...
Question 20
What is the method to do this?
Susan

Answer : Report tally of 30 questions 1-5 answers

SELECT
    'Awareness' as QuestionID,
    sum(iif(Awareness=1),1,0) as resp1,
    sum(iif(Awareness=2),1,0) as resp2,
    sum(iif(Awareness=3),1,0) as resp3,
    sum(iif(Awareness=4),1,0) as resp4,    
    sum(iif(Awareness=5),1,0) as resp5
FROM [[TableName]0
GROUP BY 'Awareness'

the above will get the you response you want (with some adjustment and debugging by you)
But because of the structure of your file you need to have one of these for each question response column in your table

try adjusting the one above to get your result set for one question (presuming that Awareness is one of the question response columns)
Random Solutions  
 
programming4us programming4us