question

essence2012388 avatar image
essence2012388 asked

How to show the overall of participation of each division in all offered quizzes?

I am a new web developer and I am developing a simple training management system which provides the users with quizzes. The system developed using ASP.NET and SQLServer. I have the following database design: Employee Table: Username, Name, DivisionCode Divisions Table: SapCode, Divison Quiz Table: QuizID, Title, Description, IsSent UserQuiz: UserQuizID, QuizID, DateTimeComplete, Username (DivisionCode is a foreign key to the SapCode. IsSent is a flag to indicate to the quizzes that have been offered and sent to the users to participate in them.) I need to come up with a query that shows the percentage of participation of each division in all the offered safety quizzes (which means quizzes with IsSent = true). For example, If I have four divisions; A, B, C and D, and I have around 23 quizzes have been sent to the employees in those divisions. Since each division has a specific percentage of participation in each quiz. My query should show the overall percentage of participation in all offered quizzes for each division. So the result should not be broken down with respect to each quiz. So how to do that?
sql-server-2008-r2queryquery-results
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers