Development questions
What are all the Aggregate Functions available in SOQL (COUNT(), COUNT(Id), COUNT_DISTINCT(), SUM(), AVG(), MIN(), MAX())?
COUNT(): number of rows (no field, returns an integer directly)COUNT(fieldName): count of non-null valuesCOUNT_DISTINCT(fieldName): count of unique non-null valuesSUM(),AVG(),MIN(),MAX(): numeric/date aggregates
soql
SELECT COUNT(Id), SUM(Amount), AVG(Amount), MIN(Amount), MAX(Amount) FROM Opportunity
SELECT COUNT_DISTINCT(Industry) FROM Account
soqlaggregate
More Development questions
- What is an Apex Trigger in Salesforce and when should you use it over Flows?
- What is the difference between before triggers and after triggers?
- Explain all Trigger context variables (isInsert, isUpdate, isDelete, isUndelete, isBefore, isAfter, isExecuting, size, operationType).
- What is the difference between Trigger.new and Trigger.old?
- In which trigger events are Trigger.new and Trigger.newMap available?
- In which trigger events are Trigger.old and Trigger.oldMap available?