+ Start a Discussion

Is there a group by , sum(), avg() functions in SOQL ?

Hi  All,
    I want to translate the following SQL into SOQL  , is it possible?  For example:
    Table: Test1
     column1      column2   column3
      s1                  90                 4
      s1                  100                5
      s2                   60                 3
      s2                   30                 2
SQL :  select  sum(column3),avg(column2) from Test1 group by  column1
What the  SOQL is ?  Is there a SOQL  in salesforce?
Thank you!!
There are no aggregate functions in SOQL.
If there no aggreggate function in SOQL how Salesforce create the crosstab report ?
Is there any way to reproduce that type of report in a visualforce page or an scontrol ?

With Winter 2010 there are some new features functions available in SOQL. See below: