Created
November 5, 2015 00:54
-
-
Save levelboy/38041ed7c338cf496443 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select IdStudent, avg(Grade) as grade_sum into @best_student_id, @best_average from Grade group by IdStudent order by grade_sum desc limit 1; | |
select * from StudentData where Id = @best_student_id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment