
****** query to pull all the lead system with arrary greater then 5 for distinct lead records
one lead record associated with multiple lead system where lead array >5
SELECT Array_Count__c,Lead_Name__c,Lead__c,Name FROM Lead_System__c where Array_Count__c > 5
when i wrote a query i get duplicate leads so how to use DISTINCT function in SOQL. Thanks
6 answers

Thanks all for your feedback, but i got this error
MALFORMED_QUERY: Field must be grouped or aggregated: Array_Count__c