Hi folks!
I'm trying to get a good query to generate a list of all the users
enrolled in courses with the Education Program extension (on en.wiki,
for the immediate purposes).
Basically, I want a query for all the usernames of any user who is
enrolled in any course for a set of terms (Spring 2013, 2013 Q1, and
2013-Q1), excluding users who have any of the four 'course' userrights
(Course coordinator, Course instructor, Course online volunteer,
Course campus volunteer).
The query that I have right now (thanks to help from Oliver and Jeroen) is this:
SELECT DISTINCT ep_users_per_course.upc_user_
id FROM ep_users_per_course INNER JOIN ep_courses WHERE
ep_courses.course_term IN ('Spring 2013','2013 Q1','2013-Q1') AND
ep_users_per_course.upc_role = 0;
But that isn't adequately isolating the actual students (as opposed to
instructors and others who are enrolled in classes as students), and
returns user IDs rather than usernames.
Any help figuring out the right query would be much appreciated!
Cheers,
Sage