 SELECT concat(u.id, p.id), u.id, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname,
                                      c.fullname, c.shortname, p.timecompleted
                                 FROM {course_completions} p
                                 JOIN {course} c ON p.course = c.id
                                 JOIN {user}   u ON p.userid = u.id
                                WHERE c.enablecompletion = 1
                             ORDER BY u.username