| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: What is Aggregation? Re: grouping in tuple relational calculus
Mikito Harakiri wrote:
> Well, the analogy is not quite complete. In your example, the mapping
is an
> extended projection that creates an extra column:
>
> select figure, sum(1) from
> {circle, circle, square, triangle}
> group by figure
>
> From from the projection enhanced with the counter, we can restore
the
> original multiset back.
>
> Then, perhaps, ordering creates a pseudocolumn with a similar purpose
too?
> Well, it's not a hard to figure out what this column should be. The
ordering
> example should look like this
>
> select figure, seq# from
> circle->square->circle->triangle
> order by figure
>
> with the return result
>
> (circle,1)
> (circle,3)
> (square,2)
> (triangle,4)
What is seq#? Perhaps, just sum(1) aggregate operator would do? Then, the proposed syntax seems to increase expressive power to what is otherwise known as SQL analytics. We can calculate any running total, not only count. It also answers the question appeared earlier in the thread whether noncommutative aggregate functions make sence. Received on Fri Feb 18 2005 - 20:05:11 CST
![]() |
![]() |