php - How to select greatest record (semester) of each id -


how select greatest semester of each student linked picture.

http://i.stack.imgur.com/ka97x.jpg

enter image description here

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

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

python - Exception while importing pymorphy2 -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -