select s.* from student s left join school sc on sc.scId = s.scId
LEFT JOIN (select MAX(scores),stu_id from achievement group by stu_id )a2 ON a2.stu_id = s.id
where s.id = '0000001';
Discover a school by a student performance of the best one
select s.* from student s left join school sc on sc.scId = s.scId
LEFT JOIN (select MAX(scores),stu_id from achievement group by stu_id )a2 ON a2.stu_id = s.id
where s.id = '0000001';
Discover a school by a student performance of the best one