| Author |
Topic |
|
dreamman
Starting Member
4 Posts |
Posted - 2010-03-15 : 12:07:55
|
| Hi,Answers to our questionnaire DBAnswers table are kept, according to this table you see the following DumpResults, DumpResults2 Can we write the query?Answers are given between 1-5 and which was given to question how many and what percentage of the answer we want to learn.Could help to friends, thank you. DumpAnswers (Source table)AnswerID ScoolCode YearID QuestionID Answer1043 888888 2 313 11044 888888 2 292 21045 888888 2 293 21046 888888 2 294 51047 888888 2 295 4Sample DumpQueryResults (How a query for below result?)ScoolCode YearID QuestionID Answer1Count Answer2Count Answer3Count Answer4Count Answer5Count888888 2 313 0 2 4 8 290888888 2 292 5 4 3 9 195888888 2 293 8 3 5 7 202888888 2 294 1 19 4 3 211888888 2 295 1 7 9 6 300 Sample DumpQueryResults2 (How a query for below result?)ScoolCode DonemID QuestionID Answer1percent Answer2percent Answer3percent Answer4percent Answer5percent888888 2 313 0 2 4 8 86888888 2 292 5 4 3 9 79888888 2 293 8 3 5 7 77888888 2 294 1 19 4 3 73888888 2 295 1 7 9 6 77 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-15 : 12:11:57
|
| I cant understand your explanation. whats the output you're expecting out of above data?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
dreamman
Starting Member
4 Posts |
Posted - 2010-03-15 : 12:19:32
|
| Ben DumpAnswers Tablosuna bir sorgu yazarak DumpResults tablosunu elde etmek istiyorum. nasil bir sorgu yazacagimi bilemiyorum. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-15 : 12:22:53
|
quote: Originally posted by dreamman Ben DumpAnswers Tablosuna bir sorgu yazarak DumpResults tablosunu elde etmek istiyorum. nasil bir sorgu yazacagimi bilemiyorum.
please translate this in english------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-03-15 : 12:24:43
|
quote: Originally posted by dreamman Ben DumpAnswers Tablosuna bir sorgu yazarak DumpResults tablosunu elde etmek istiyorum. nasil bir sorgu yazacagimi bilemiyorum.
Oh! Now everything is clear  No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
dreamman
Starting Member
4 Posts |
Posted - 2010-03-15 : 18:22:33
|
| i am so sory.I'm typing a query for DumpAnswers Table. i want as a table DumpResults. I do not know how to write a query. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-03-15 : 18:25:22
|
So can you tell us the rules how this'1043 888888 2 313 1'would become this'888888 2 313 0 2 4 8 290'Where do '0 2 4 8 290' come from? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
dreamman
Starting Member
4 Posts |
Posted - 2010-03-15 : 21:36:49
|
| I'm doing a survey. Each question is given a score between 1 and 5. What I question, for which the answer I want to calculate how many people vote.Example:Question 313, 1 point 3 people, 2 point 5 people, 3 points 50 people, etc. ... To obtain a result that is as follows DumpQueryResults want. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-16 : 00:05:45
|
| where do you store the voted people info?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|