View Single Post
  #1 (permalink)  
Old 10-10-2006, 04:30 AM
Jim
 
Posts: n/a
Default Oracle dialect question:

Maximum Value - Beginner Question?


Hi,

I'm a massive beginner of SQL and just having trouble finishing this problem. I need to get the Max of SUM(price) and output both this and e.name. I'm just not to sure how to go about it, im guessing I need to use a subquerry.

SELECT e.name, SUM(price)
FROM hsTreatment t, hsVisitHistory V, hsEmployee e
WHERE t.treatmentid = v.treatmentid
AND e.empid = v.stylistid
GROUP BY e.name;
Edit/Delete Message Reply With Quote

ANSWER(S):