function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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: