Goldcorp unenroll users from curriculums
Overview
Overview
Goldcorp has asked for an "unenroll", providing a CSV of logins plus a number of curriculum IDs.
SQL
SQL
UPDATE enrollments AS e
LEFT JOIN users AS u
ON u.id = e.user_id
SET e.is_active = 0
, e.notes = 'mj 2016-07-03'
WHERE
e.curriculum_id IN (117,106,116,105,118,108)
AND u.login IN (
'bernardino.zuniga', 'carlos.marquez'
)