Salesforce Developer Soql Syntax

salesforce-developer-soql

// Salesforce - Developer - SOQL - Syntax:

SELECT fieldList [subquery][...]
[TYPEOF typeOfFields whenExpression[...] elseExpression END][...]
FROM objectType[,...]
  [USING SCOPE filterScope]
[WHERE conditionExpression]
[WITH [DATA CATEGORY] filteringExpression]
[GROUP BY {fieldGroupByList | ROLLUP (fieldSubtotalGroupByList) | CUBE
  (fieldSubtotalGroupByList) }
  [HAVING havingConditionExpression]]
[ORDER BY fieldOrderByList {ASC | DESC} [NULLS {FIRST | LAST}]]
[LIMIT numberOfRowsToReturn]
[OFFSET numberOfRowsToSkip]
[FOR {VIEW | REFERENCE}[,...]]
  [UPDATE {TRACKING | VIEWSTAT}[,...]]
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License