SQL Query to count number of courses using the gradebook by Eric Katchan - Tuesday, 18 December 2018, 1:08 AM Number of replies: 0 Hello, I was wondering if anyone knew a query where I could determine the number of courses in moodle using the gradebook? I am wonder if the following would provide an accurate count.select count ( distinct courseid ) from mdl_grade_settings; Permalink Reply