I have a query like below:
Select Lname, MAX(HOURS)    
From (Select E.LName, SUM(Hours) as HOURS    
From WORKS_ON W    
     JOin EMPLOYEE E on E.SSN=W.ESSN    
Group by E.SSN) as hours
The answer is like:
Lname MAX(HOURS)
Black 55
From DB 55 is right answer for the max hour. But Black is not working 55 hours, it is another man called Grant. It seems like I have an answer that do not relate to each other. What should I do in order to get like:
"Grant 55" as an answer.

