 SELECT u.id, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, h.idnumber, h.name
                                 FROM {cohort} h
                                 JOIN {cohort_members} hm ON h.id = hm.cohortid
                                 JOIN {user} u ON hm.userid = u.id
                               ORDER BY u.firstname