1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
SELECT
mu.firstname
, mu.lastname
, mc.Fullname
, mss.title
, SUM(CASE WHEN msst.element ='cmi.core.total_time'
THEN msst.value END
) Time
, SUM(CASE WHEN msst.element ='cmi.core.score.raw'
THEN msst.value END
) Score
FROM mdl_scorm_scoes_track msst
INNER JOIN mdl_user mu ON mu.id = msst.userid
INNER JOIN mdl_scorm ms ON ms.id = msst.scormid
INNER JOIN mdl_course mc ON mc.id = ms.course
INNER JOIN mdl_scorm_scoes mss ON mss.id = msst.scoid
WHERE msst.element='cmi.core.total_time'
OR msst.element='cmi.core.score.raw'
GROUP BY
mu.firstname
, mu.lastname
, mc.Fullname
, mss.title |