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
and returns user IDs rather than usernames.
you might like to try this:
SELECT DISTINCT `user_name` FROM ep_users_per_course INNER JOIN ep_courses JOIN user ON user_id = upc_user_id WHERE course_term IN ('Spring 2013','2013 Q1','2013-Q1') AND upc_role = 0;
and, as far as I can see, this query does isolate only students' names.
Best, -- Haitham
On Fri, Apr 5, 2013 at 10:47 AM, Sage Ross ragesoss+wikipedia@gmail.com wrote:
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
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics
On Fri, Apr 5, 2013 at 2:43 PM, Haitham Shammaa hshammaa@wikimedia.org wrote:
and returns user IDs rather than usernames.
you might like to try this:
SELECT DISTINCT `user_name` FROM ep_users_per_course INNER JOIN ep_courses JOIN user ON user_id = upc_user_id WHERE course_term IN ('Spring 2013','2013 Q1','2013-Q1') AND upc_role = 0;
and, as far as I can see, this query does isolate only students' names.
Thanks, Haitham! Would this include the names of users who are signed up as students for a class, but also as an instructor or campus/online volunteer? Those are the ones that I'd like to be sure to remove.
-Sage
Best,
Haitham
On Fri, Apr 5, 2013 at 10:47 AM, Sage Ross ragesoss+wikipedia@gmail.com wrote:
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
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics
No, those are not included.
-- Haitham
On Fri, Apr 5, 2013 at 11:56 AM, Sage Ross ragesoss+wikipedia@gmail.com wrote:
On Fri, Apr 5, 2013 at 2:43 PM, Haitham Shammaa hshammaa@wikimedia.org wrote:
and returns user IDs rather than usernames.
you might like to try this:
SELECT DISTINCT `user_name` FROM ep_users_per_course INNER JOIN ep_courses JOIN user ON user_id = upc_user_id WHERE course_term IN ('Spring 2013','2013 Q1','2013-Q1') AND upc_role = 0;
and, as far as I can see, this query does isolate only students' names.
Thanks, Haitham! Would this include the names of users who are signed up as students for a class, but also as an instructor or campus/online volunteer? Those are the ones that I'd like to be sure to remove.
-Sage
Best,
Haitham
On Fri, Apr 5, 2013 at 10:47 AM, Sage Ross ragesoss+wikipedia@gmail.com wrote:
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
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics
Thanks Haitham!!!
On Fri, Apr 5, 2013 at 3:21 PM, Haitham Shammaa hshammaa@wikimedia.org wrote:
No, those are not included.
-- Haitham
On Fri, Apr 5, 2013 at 11:56 AM, Sage Ross ragesoss+wikipedia@gmail.com wrote:
On Fri, Apr 5, 2013 at 2:43 PM, Haitham Shammaa hshammaa@wikimedia.org wrote:
and returns user IDs rather than usernames.
you might like to try this:
SELECT DISTINCT `user_name` FROM ep_users_per_course INNER JOIN ep_courses JOIN user ON user_id = upc_user_id WHERE course_term IN ('Spring 2013','2013 Q1','2013-Q1') AND upc_role = 0;
and, as far as I can see, this query does isolate only students' names.
Thanks, Haitham! Would this include the names of users who are signed up as students for a class, but also as an instructor or campus/online volunteer? Those are the ones that I'd like to be sure to remove.
-Sage
Best,
Haitham
On Fri, Apr 5, 2013 at 10:47 AM, Sage Ross ragesoss+wikipedia@gmail.com wrote:
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
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics