Here's the classic way of doing this:
This version is a little cleaner than Mathias's version with the inline view.
Here's an old explanation of this.
And partway down in
this thread, I give some reasons for favoring the correlated subquery approach over a "group by" approach.
[ April 04, 2007: Message edited by: Michael Matola ]