Analytic functions calculate an aggregate value based on a group of rows. Unlike aggregate functions, however, analytic functions can return multiple rows for each group. Use analytic functions to ...
Statistical aggregate analytic functions summarize data over a group of rows from the database. The groups are formed using the GROUP BY clause of the SELECT statement. Aggregate functions are allowed ...
I'm sure Oracle's analytic functions can handle this, but I'm having a hard time wrapping my head around the syntax. If anyone has another solution, I'd be happy to hear it too.