Skip to content

Instantly share code, notes, and snippets.

@rrguntaka
Created March 28, 2012 17:19
Show Gist options
  • Save rrguntaka/2228378 to your computer and use it in GitHub Desktop.
Save rrguntaka/2228378 to your computer and use it in GitHub Desktop.
Online Course Progress
select t1.*, t2.score,t2.total from oc_course t1,
(SELECT class_id,sum(weight*score/max_points) score, sum(weight) total FROM `oc_score` WHERE selected = 1 group by class_id) t2 where t1.class_id = t2.class_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment