I have this query and it works fine however i need the query to display the forename and surname and currently it only displays the max value of the sum it performs
Does anybody know what i can do?
Thanks
Does anybody know what i can do?
Thanks
Code:
SELECT MAX(Intermediate.Total_Amount_Of_Likes) AS Total_Amount_Of_Likes FROM ( SELECT Forename, Surname, Sum(Likes) AS Total_Amount_Of_Likes FROM Instructors, Exercise_Class_Type, Exercise_Class_Staff, Exercise_Class_Booking, Feedback WHERE Exercise_Class_Type.Exercise_Class_ID = Exercise_Class_Staff.Exercise_Class_ID AND Exercise_Class_Type.Exercise_Class_ID = Exercise_Class_Booking.Exercise_Class_ID AND Exercise_Class_Booking.Exercise_Booking_ID = Feedback.Exercise_Booking_ID AND Instructors.Instructor_ID = Exercise_Class_Staff.Instructor_ID AND Start_Date_Time >= Date() - 30 GROUP BY Forename, Surname ) Intermediate;
Comment