Skip to main content
added 5 characters in body
Source Link
Adrian Larson
  • 151.3k
  • 38
  • 247
  • 431

I think the following query might do what you need:

SELECT AVG(SAT_Score__c) mean
FROM Case
WHERE SAT_Score__c != null 
AND OwnerId = '005xxxxxxxxxxxx'
GROUP BY OwnerId
ORDER BY MIN(ClosedDate) DESC
Limit 20

I think the following query might do what you need:

SELECT AVG(SAT_Score__c) mean
FROM Case
WHERE SAT_Score__c != null 
AND OwnerId = '005xxxxxxxxxxxx'
GROUP BY OwnerId
ORDER BY MIN(ClosedDate)
Limit 20

I think the following query might do what you need:

SELECT AVG(SAT_Score__c) mean
FROM Case
WHERE SAT_Score__c != null 
AND OwnerId = '005xxxxxxxxxxxx'
GROUP BY OwnerId
ORDER BY MIN(ClosedDate) DESC
Limit 20
Source Link
Adrian Larson
  • 151.3k
  • 38
  • 247
  • 431

I think the following query might do what you need:

SELECT AVG(SAT_Score__c) mean
FROM Case
WHERE SAT_Score__c != null 
AND OwnerId = '005xxxxxxxxxxxx'
GROUP BY OwnerId
ORDER BY MIN(ClosedDate)
Limit 20