SQLTeam.com | Weblogs | Forums

SQL Percentage by group of questions


#1

I have a survey with lets say 20 questions divided into 5 sections. 4 question per section
at the end of each section i would like the get the percentage of of yes and no answers

example
section 1

  1. are you able to work YES
    2, DO YOU LIVE IN THE USA YES
    3.CAN YU DRIVE NO
  2. DO YOU HAVE KIDS YES

ANSWERS WITH YES % ANSWERS WITH NO %
90% 10%

SECTION 2

1 YES
2 YES
3 YES
4 YES

ANSWERS WITH YES % ANSWERS WITH NO %
100% 0

whats the best way to do this


#2

Not quite clear your rules for aggregation based on the example you posted. Is there another table with additional data? What is the rule that you used to calculate that YES answers are 90% and NO are 10%