You need to sign in to do that
Don't have an account?
Charlone Gianan 1
How to group query results based on the number of filters matched?
Hello. Can you guys help me how can I group query results based on the number of filters matched.
For example, I have 5 filters then I am looking for (5 skills), 'Apex' , 'Lightning' , 'Visualforce', 'HTML' and 'Java'. These skills is from lookup relataionship(Employee_Skills__c) to Contact(renamed - Employee).
The result should display in a table like this.
5 matches out of 5 filters
4 matches out of 5 filters
3 matches out of 5filters
2 matches out of 5 filters
1 match out of 5 filters
Here's my soql:
SELECT Name, Email, (SELECT Skill_ID__r.Name, Proficiency__c, Year_of_Experience__c FROM Employee_Skills__r), (SELECT Training_ID__r.Name FROM Employee_Training__r), (SELECT Certification_ID__r.Name FROM Employee_Certifications__r) FROM Contact
For example, I have 5 filters then I am looking for (5 skills), 'Apex' , 'Lightning' , 'Visualforce', 'HTML' and 'Java'. These skills is from lookup relataionship(Employee_Skills__c) to Contact(renamed - Employee).
The result should display in a table like this.
5 matches out of 5 filters
4 matches out of 5 filters
3 matches out of 5filters
2 matches out of 5 filters
1 match out of 5 filters
Here's my soql:
SELECT Name, Email, (SELECT Skill_ID__r.Name, Proficiency__c, Year_of_Experience__c FROM Employee_Skills__r), (SELECT Training_ID__r.Name FROM Employee_Training__r), (SELECT Certification_ID__r.Name FROM Employee_Certifications__r) FROM Contact