Here is the one for researchers:

```sql
SELECT 
       "student_exercises".* 
FROM "student_exercises" 
INNER JOIN 
      "student_assignments" ON "student_assignments"."id" = "student_exercises"."student_assignment_id" 
INNER JOIN 
      "students" ON "students"."id" = "student_assignments"."student_id" 
INNER JOIN 
      "consents" ON "consents"."consentable_id" = "students"."id" 
AND  "consents"."consentable_type" = 'Student' 
INNER JOIN "users" ON "students"."user_id" = "users"."id" 
WHERE "student_exercises"."assignment_exercise_id" = 10 
AND "consents"."did_consent" = 't' 
AND (1 = 1) 
ORDER BY "students"."has_dropped", "students"."is_auditing", lower("users"."last_name")
```