Hello,
I'm trying to create a query that returns me the courses and groups of students in these courses, but I want to return the students who are not in any group too, is it possible?
My first try query:
SELECT u.id,u.firstname,u.lastname,u.email,g.name,g.courseid,c.fullname FROM mdl_groups_members m
LEFT JOIN mdl_groups g ON g.id=m.groupid
LEFT JOIN mdl_user u ON u.id=m.userid
LEFT join mdl_course c ON c.id = g.courseid
WHERE u.username = ''
Thanks.