Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Using SQL to sum up questions from a survey

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-06-05 : 21:37:03
Paul writes "I have been working on developing a dynamic survey for a little over 2 weeks now. At the moment I have a created survey that consists of 7 questions, 5 questions consist of radio button type responses, and 2 consist of text. of the 5 radio response type 4 are of yes/no value and one is a scale (poor, fair, good) etc.

As each person takes our survey I know that of those 4 (yes/no) responses I will have a yes or no answer and each time and the answer will be tied to the question # and survey id of the survey they are taking. My question is, how can I sum up (in percentages) how many users selected yes or no for a particular question in my answers database ?. My database structures are as follows:

Survey table:
ID
SurveyName

Question table:
ID
SurveyID
Question
QuestionType

Answer Table:
ID
QuestionID
SurveyID
Answer

Thanks,
Paul

Also what would you recommend as far as structuring a database that supports a dynamic survey builder and records the answers. This is the first time I've done something like this and I am not sure that the way I've done it is the best way to do it."
   

- Advertisement -