+ Start a Discussion
Suja RajSuja Raj 

SOQL query help URGENT

SOQL query help URGENT
Lead object is the parent and child object is Lead system i need a
****** 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
You Can use below Query
FROM Lead_System__C where Array_Count__c>5
Suja RajSuja Raj
Thanks for ur feedback, the following query didn't work either

Lend is the parent object and lead system is the child object 
I am trying to get array count >5 from Lead system and distinct lead   I tried the following didn't work please help
 Select array_count__c, COUNT_DISTINCT (LEAD__c) ,Name from Lead_system__c where Array_count__c >5