If you are a student asking this question, then I suggest that you work on it yourself for a while, and then post both your complete question and your proposed answer.
This is a classic question in SQL, and there are many answers, all of which teach a lot of how SQL works.
Some questions you should consider:
What do you do if the table has less than 3 rows?
What do you do if two values are tied (include them, so more than 3 rows are returned? Return only 3, so that one or more rows get excluded arbitrarily? Return an error message, saying there is a tie?)
Malcolm
wynden@telus.net
November is "be kind to dogs and programmers" month. Or is that "dogs or programmers"?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.