Trying to Run a few tables through the same query
Trying to Run a few tables through the same query
Last edited by Student123; 06-28-2017 at 09:35 PM.
something more like............. (I'm no expert!)
The theory is get the top 21 values you need as a subquery in bracketsCode:SELECT top 1 Student.Name, SUM(Test.Score) from (SELECT TOP 21 Student.Name FROM Student INNER JOIN Test ON Student.StudentNumber = Test.StudentNumber GROUP BY Student.Name) ORDER BY SUM(Manifest.Ticketprice) DESC
then select the top 1 of those when they are ordered in the reverse order