function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
SELECT Count(ID) studentCnt, Class__r.Name className FROM Student__c GROUP BY Class__r.Name
SELECT Count(ID), Name FROM Student__c GROUP BY Name
Thanks, Alex
All Answers
You need use Group By for this
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks,
Alex
Thanks, Alex