2020年4月23日 星期四

quiz

SELECT
prefix_user.username as "學生",prefix_user.department "部門",FROM_UNIXTIME(prefix_grade_grades.timecreated) as "考試日期",prefix_grade_items.itemname as "課程名稱",
ROUND(prefix_grade_grades.finalgrade, 0) AS "課程總分"
FROM
prefix_grade_grades
INNER JOIN prefix_user ON prefix_grade_grades.userid = prefix_user.id
INNER JOIN prefix_grade_items ON prefix_grade_grades.itemid = prefix_grade_items.id
WHERE (prefix_grade_items.itemname IS NOT NULL)
AND (prefix_grade_items.itemtype = 'mod' OR prefix_grade_items.itemtype = 'manual')
AND (prefix_grade_items.itemmodule = 'quiz' OR prefix_grade_items.itemmodule IS NULL)
AND (prefix_grade_grades.timemodified IS NOT NULL)
AND (prefix_grade_grades.finalgrade > 0)
AND (prefix_user.deleted = 0)

沒有留言:

張貼留言