function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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
JethaJetha
You Can use below Query
SELECT COUNT_DISTINCT(Lead__c)
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