Timeline for soql aggregate query has issue returning id of record
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 21, 2016 at 19:21 | history | edited | pchittum |
edited tags
|
|
Nov 17, 2015 at 18:57 | vote | accept | textual | ||
Nov 17, 2015 at 18:53 | comment | added | textual | that does not work as it includes the id in the aggregate, thereby bringing back each individual record, not just the one with the max date | |
Nov 17, 2015 at 18:51 | answer | added | Santanu Halder | timeline score: 1 | |
Nov 17, 2015 at 18:49 | comment | added | Himanshu | you need to include id in your SOQL group by clause. so it will be SELECT max(start_date__c), id FROM Opportunity WHERE StageName = 'Signed' AND AccountId IN ('001G000001cK7P2') GROUP BY AccountId,id | |
Nov 17, 2015 at 18:42 | history | asked | textual | CC BY-SA 3.0 |