Query to create Pie Chart

sullyman

Registered User.
Local time
Today, 07:33
Joined
Oct 24, 2009
Messages
47
I need to create a pie chart to show the percentage of employees who have completed a course.

I have 3 tables
Employees (PK_Employeeid, Employee)
Courses (PK_Courseid, Course)
Courses_Completed (PK_Completedid, FK_Employeeid, FK_Courseid)

For example, if there are 100 employees and only 25 have completed the course, i would like the Pie chart to show 25% etc.

I am a bit lost on how to create such a query
 
I am able to get the count of employees in the following query

SELECT COUNT(Employee) AS TotalEmployees
FROM dbo.Employees

And i am able to get the employees who completed the course in another query

SELECT EmployeeID
FROM dbo.CourseCompleted
WHERE (Courseid = 2)
GROUP BY EmployeeID

How do i add these queries together to make a percentage pie chart. Any help appreciated folks
 
Any ideas guys. This is driving me nuts :confused:
 
Remember a graph is just like a report but displayed in a different way. It needs an underlying data source. Your query needs at least 1 numberic value. If you group by course and count by course. You can then save this query then use the wizard to create a graph based on this query.

David
 

Users who are viewing this thread

Back
Top Bottom