Hi,
this script gives us list of courses with teachers. I want to add to this report courses, where numer of teachers is 0. Does anyone know, how to do this?
SELECT c.id, c.fullname, c.shortname, ra.userid, u.firstname, u.lastname
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
WHERE ra.roleid =3
AND ctx.instanceid = c.id