 SELECT concat(u.id, p.id), u.id, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, c.fullname, c.shortname,
                                      t.timecompleted, p.module, p.moduleinstance
                                 FROM {course_completion_crit_compl} t
                                 JOIN {user}    u ON t.userid = u.id
                                 JOIN {course}  c ON t.course = c.id
                                 JOIN {course_completion_criteria} p ON t.criteriaid = p.id