bug-fix: sort on cohort

- enable sorting by cohort in the assignment list by
  defining custom joins