Can I use aggregate functions?

2 views
Skip to first unread message

D

unread,
Dec 30, 2011, 7:52:10 AM12/30/11
to aks...@googlegroups.com
I've find akshell just yesterday, really nice product!

Let's say I have the following table: (RelVar, set of tuples...)

Id | Num | CategoryID  
--------------------- 
a  | 2   | x
b  | 3   | y
c  | 5   | z
d  | 0   | x
e  | 4   | z 
f  | 2   | z

How could I get something like:

CategoryID | Count(*) | Sum(Num)
--------------------------------
x          | 2        | 2
y          | 1        | 3
z          | 3        | 11

Does it possible to use aggregate functions as in SQL, or should I fetch all data and then loop over it?
Reply all
Reply to author
Forward
0 new messages