This is very easy to do. You need to use a group by clause in a select statement.
R> select account, (sum(budget)) from mytable group by account The only trick with group by clauses is that for every col in the select that is not an aggregate function like sum must also appear in the group by clause. Troy Sosamon Denver, Co. ------- Original Message -------- i know this is more of an sql question (and a newbie one at that) than an rbase question but im having a problem tryin to figure this out. I have a table with 2 columns...1 is Account and the other is Budget. What i need is a sum of Budget, but there are duplicate entries so i need it to sum Budget where Account is distinct. Anyone know how to do this? thanx for the help! ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEARCH ARCHIVES: http://www.mail-archive.com/rbase-l%40sonetmail.com/
