Hi Juan and everybody else,
could someone tell me what i am doing wrong here!! it's driving me nutts
_____________
SELECT u.firstname AS 'First' , u.lastname AS 'Last', u.firstname + ' ' + u.lastname AS 'Display Name',
cc.name AS 'Category',
CASE
WHEN gi.itemtype = 'course'
THEN c.fullname + ' Course Total'
ELSE gi.itemname
END AS 'Item Name',
ROUND(gg.finalgrade,2) AS Grade,
DATEADD(ss,gi.timemodified,'1970-01-01') AS Time
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.itemtype = 'course'
ORDER BY lastname
___________________________________________________
This is supposed to be a Site-Wide Grade Report with Just Course Totals, i found it on the ad-hoc. it says MySQL users, you'll need to use the MySQL DATE_ADD function instead of DATEADD:DATE_ADD('1970-01-01', INTERVAL gi.timemodified SECONDS) AS Time
Tried them both and it still won't work.
Thank you