I am running analyses on a quiz and am trying to manipulate querys in order to produce bar charts. I am trying to display a graph which shows the percentages of candidates passing a particular quiz. The query I am trying to run is as follows:
SELECT QuizName, (100*(COUNT(PassFail))/(COUNT(XXXXXX))) AS 'Total' FROM Resultsets WHERE PassFail ='PASS' GROUP BY QuizName
Where XXXXX has been a number of things listed below, all which have failed.
1) I have tried to use the line (100*(COUNT(PassFail),(WHERE PassFail= PASS)) / (COUNT (PassFail)))
2) I have also tried creating a routine which counts the number of times a Quiz has been used and than using CALL in the place of COUNT(XXXX), this didnt work.
I am not sure what to do? The quizzes have been attempted a different number of times so I cant just insert a number. Any help would be greatly appreciated!! Plus if i have emitted any necessary information please let me know and I will include it.