Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Statistics under each group

Explorer ,
Dec 23, 2009 Dec 23, 2009

Hi, Background: I am querying a table which gives me a list of every people manager in the organization and their direct reports. I am able to do this because of a couple of fields, namely EmpID and MgrID. I loop through each level in the heirarchy and it spits out a list of employees for that manager. It works well and does what I want it to do. The lists that are produced show the employee's first and lastname and Completion date. If there is a date in the completion date column then that means that the employee completed the online course that is mandatory throughout the company.

My question is this. How can I get statistics under each group? For example, under each group I would like to list the following: Total number of employees within the group, number of employees completing the course, and finally the completion rate which is number of completions divided by total number in group. Thank you very much. I have attached my code in a cfm file.

246
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 23, 2009 Dec 23, 2009
LATEST

Hi,

Use the SQL aggregate functions,

http://www.sql-tutorial.com/sql-aggregate-functions-sql-tutorial/

And if you want to have your statistics as a graphical representation, you can use CF's <cfchart> tag,

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_c_05.html

HTH

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources