Table 'asu.students' doesn't exist -> SELECT distinct(person.id) as id, person.fio as name FROM study_activity as activity INNER JOIN kadri as person ON activity.kadri_id = person.id INNER JOIN students as student ON student.id = activity.student_id ORDER BY person.fio asc ;