I have a table like this, with three fields:
User | Question# | Answer
The answer choices are only 1, 2, 3, 4 or 5
I need to write a SELECT statement such that it prints the percentage of the answers 1 and 2 together along with the percentage of the answers 3, 4 and 5 together.
The result should be like this:
Question# | %One+Two | %Three+Four+Five
1 %30 %70
2 %23 %77
. . .
. . .
. . .
I did this as an example to show the count of answers 1 and 2, but it doesn’t provide what I need:
select QNum, Response, Count(Response)
from SurveyResults
group by QNum, Response
having Response<3;
1 Answer