def _fetch_course_enrollment_data(self, enterprise_customer_uuid):
query = '''<STR_LIT>'''<EOL>with connection.cursor() as cursor:<EOL><INDENT>if enterprise_customer_uuid:<EOL><INDENT>cursor.execute(<EOL>query.format(enterprise_customer_filter='<STR_LIT>'),<EOL>[enterprise_customer_uuid]<EOL>)<EOL><DEDENT>else:<EOL><INDENT>cursor.execute(<EOL>query.format(enterprise_customer_filter='<STR_LIT>')<EOL>)<EOL><DEDENT>return self._dictfetchall(cursor)<EOL><DEDENT>
Return enterprise customer UUID/user_id/course_run_id triples which represent CourseEnrollment records
which do not have a matching EnterpriseCourseEnrollment record.

The query used below looks for CourseEnrollment records that are associated with enterprise
learners where the enrollment data is after the creation of the link between the learner
and the enterprise. It also excludes learners with edx.org email addresses in order to
filter out test users.