Newer Version Available
Supported SOQL Commands
Async SOQL supports a subset of commands in the SOQL language. The subset includes the
most common commands that are relevant to key use cases.
WHERE
Comparison
operators
Logical operators
Date
formats
Example
Date Functions
Date functions in Async SOQL queries allow you to group or filter data by time periods, such as day or hour.
| Method | Details |
|---|---|
| DAY_ONLY() | Returns a date representing the day portion of a dateTime field. |
| HOUR_IN_DAY() | Returns a number representing the hour in the day for a dateTime field. |
| CALENDAR_MONTH() | Returns a number representing the month for a dateTime field. |
| CALENDAR_YEAR() | Returns the year for a dateTime field. |
Example
Aggregate Functions
Example
HAVING
Use this command to filter results from aggregate functions.
Example
GROUP BY
Use this option to avoid iterating through individual query results. Specify a group of records instead of processing many individual records.
Example
Relationship Queries
Single-level child-to-parent relationships are supported using dot notation. Use these queries with the SELECT, WHERE, and GROUP BY clauses.
Example
Using Aliases with Aggregates
Examples