Pie chart

More
7 years 7 months ago #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

Please Log in to join the conversation.

More
7 years 7 months ago #5385 by 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.

Thanks
Daniel

Please Log in to join the conversation.

More
7 years 7 months ago #5387 by Julien Camus
Replied by Julien Camus on topic Pie chart
Hello Daniel,

We had already pay for help last month...

Best Regards
Chris

Please Log in to join the conversation.

More
7 years 7 months ago #5398 by 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.

Thanks
Daniel

Please Log in to join the conversation.

Cron Job Starts