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;
|