OpenDB SQL: Courses Using Course Themes

Discussion created by chris.bray on Oct 6, 2017
Latest reply on Oct 7, 2017 by jkelley_blackboard

To prepare our campus in advance for the 2016 Bb Learn theme, we wanted to know which instructors and courses were using Course Themes. (Roughly 25%).


This query returns the course ID, theme name, and instructor username.


select cm.course_id, ct.name_key, u.user_id

from course_main cm

left outer join course_theme ct on cm.course_theme_pk1 = ct.pk1

JOIN course_users cu on cm.pk1 = cu.crsmain_pk1

JOIN users u on cu.users_pk1 = u.PK1

WHERE (cm.course_id like '1173-THEUA%' or cm.course_id like 'MASTER-1173%')

AND ct.name_key IS NOT NULL

AND cu.role = 'P' AND cu.row_status = 0

order by cm.course_id