php - How to select greatest record (semester) of each id -
how select greatest semester of each student linked picture.
select s1.* student s1 inner join ( select student_id,max(semester) semester student group student_id ) s2 on s1.student_id=s2.student_id , s1.semester=s2.semester
Comments
Post a Comment