Juan Leyva or anyone,
How would I Group By in the Template?
Example query:
SELECT u.username AS 'Student',
c.fullname AS 'Course',
gi.itemname AS 'Module',
CONVERT(VARCHAR, DATEADD(s, gg.timemodified, '19700101'), 22) AS 'Date'
FROM prefix_course AS c
JOIN prefix_context AS ctx ON c.id = ctx.instanceid
JOIN prefix_role_assignments AS ra ON ra.contextid = ctx.id
JOIN prefix_user AS u ON u.id = ra.userid
JOIN prefix_grade_grades AS gg ON gg.userid = u.id
JOIN prefix_grade_items AS gi ON gi.id = gg.itemid
JOIN prefix_course_categories AS cc ON cc.id = c.category
WHERE gi.courseid = c.id
AND gi.itemname != 'Attendance'
AND CAST((gg.finalgrade) AS DECIMAL) > '99'
AND u.deleted = 0
%%FILTER_STARTTIME:gg.timemodified:>%%
%%FILTER_ENDTIME:gg.timemodified:<%%
%%FILTER_COURSES:c.id%%
GROUP BY c.fullname, gi.itemname, u.username, CONVERT(VARCHAR, DATEADD(s, gg.timemodified, '19700101'), 22)
I am trying to only list the 'Student' and 'Course' once in a table and have the multiple 'Modules' with 'Date's completed listed bellow.
John Doe
|
Jane Smith
|