Pie chart
- Daniel
- Offline
- Administrator
-
29 Jan 2018 11:26 #5398
by Daniel
Thanks
Daniel
Replied by Daniel on topic Pie chart
Hello,
Yeah, I know we wrote Database query for you. And I hope that is working perfectly fine as per your requirements. Now, do you want us to modify the same Query for another Chart or want us to write a different Query? In both the cases, it would be chargeable ( It won't be chargeable only if It's not working as per your previous requirements ). Please contact our Sales team.
Yeah, I know we wrote Database query for you. And I hope that is working perfectly fine as per your requirements. Now, do you want us to modify the same Query for another Chart or want us to write a different Query? In both the cases, it would be chargeable ( It won't be chargeable only if It's not working as per your previous requirements ). Please contact our Sales team.
Thanks
Daniel
Please Log in to join the conversation.
- Julien Camus
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 15
- Daniel
- Offline
- Administrator
-
26 Jan 2018 11:51 #5385
by Daniel
Thanks
Daniel
Replied by Daniel on topic Pie chart
Hello,
Okay, Please let us know if you want us to assist you in writing the Database queries? Please contact our Sales team for the purpose via Contact us -> Request a Quote form.
Okay, Please let us know if you want us to assist you in writing the Database queries? Please contact our Sales team for the purpose via Contact us -> Request a Quote form.
Thanks
Daniel
Please Log in to join the conversation.
- Julien Camus
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 15
25 Jan 2018 15:06 #5373
by Julien Camus
Pie chart was created by Julien Camus
Hello,
I try to create a pie chart in percentage with
SELECT sum(col1) AS passed, sum(col2) AS failed
FROM ( SELECT count(*) FROM #__admincrm_programs AS p
LEFT JOIN #__admincrm_versions AS v ON(v.programs_id=p.id)
LEFT JOIN #__admincrm_sessions AS s ON(s.versions_id=v.id)
LEFT JOIN #__admincrm_enrollments AS e ON(e.sessions_id=s.id)
LEFT JOIN #__admincrm_results AS r ON(e.id=r.enrollments_id)
WHERE r.score>=75 AND p.id IN(2,7,16,17) AND YEAR(r.date_event)="2017" ) AS col1
UNION ALL
(SELECT count(*)
FROM #__admincrm_programs AS p
LEFT JOIN #__admincrm_versions AS v ON(v.programs_id=p.id)
LEFT JOIN #__admincrm_sessions AS s ON(s.versions_id=v.id)
LEFT JOIN #__admincrm_enrollments AS e ON(e.sessions_id=s.id)
LEFT JOIN #__admincrm_results AS r ON(e.id=r.enrollments_id)
WHERE p.id IN(2,7,16,17) AND r.score>0 AND r.score<75 AND YEAR(r.date_event)="2017") AS col2
Thanks
Chris
I try to create a pie chart in percentage with
SELECT sum(col1) AS passed, sum(col2) AS failed
FROM ( SELECT count(*) FROM #__admincrm_programs AS p
LEFT JOIN #__admincrm_versions AS v ON(v.programs_id=p.id)
LEFT JOIN #__admincrm_sessions AS s ON(s.versions_id=v.id)
LEFT JOIN #__admincrm_enrollments AS e ON(e.sessions_id=s.id)
LEFT JOIN #__admincrm_results AS r ON(e.id=r.enrollments_id)
WHERE r.score>=75 AND p.id IN(2,7,16,17) AND YEAR(r.date_event)="2017" ) AS col1
UNION ALL
(SELECT count(*)
FROM #__admincrm_programs AS p
LEFT JOIN #__admincrm_versions AS v ON(v.programs_id=p.id)
LEFT JOIN #__admincrm_sessions AS s ON(s.versions_id=v.id)
LEFT JOIN #__admincrm_enrollments AS e ON(e.sessions_id=s.id)
LEFT JOIN #__admincrm_results AS r ON(e.id=r.enrollments_id)
WHERE p.id IN(2,7,16,17) AND r.score>0 AND r.score<75 AND YEAR(r.date_event)="2017") AS col2
Thanks
Chris
Please Log in to join the conversation.