Help with SOQL query using parent-child relationships – Salesforce Developer Community / Best Google Courses & Certifications [2023]

I a trying to build SOQL query displaying credit summary used a unique student. We’re on EDA so we’re trying to use the Course, Course Offering, Course Connection, and Contact objects to generate this. 
Here is requesting that displays information we need, not only for courses particular student enrolled. We would need to add course contact since training that student is not enrolled.

select (SELECT hed__Course_Offering__r.hed__Course__r.Subject__c,
hed__Course_Offering__r.hed__Course__r.Catalog_Number__c,
hed__Course_Offering__r.hed__Course__r.Name,
hed__Course_Offering__r.hed__Course__r.hed__Credit_Hours__c, hed__Course_Offering__r.hed__Course__r.Course_Name_in_Native_Language__c,
Letter_Grade__c
FROM hed__Student_Course_Enrollments__r where Subject__c =’GDBA’ and Catalog_Number__c LIKE ‘71%’)  
from Contact where Id=’0031I00001NcWIBQA3′

I also proven on query, but information are not distinct and doesn properly formatted:

SELECT  hed__Course__r.Subject__c,
hed__Course__r.Catalog_Number__c,hed__Course__r.Name, hed__Course__r.hed__Credit_Hours__c,
hed__Course__r.Course_Name_in_Native_Language__c,
(Select Letter_Grade__c  from hed__Course_Enrollment__r where hed__Contact__c = ‘0031I00001NcWIBQA3’)
FROM hed__Course_Offering__c Where hed__Course__r.Subject__c =’GDBA’ and hed__Course__r.Catalog_Number__c LIKE ‘71%’

EGO would appreciate any suggestions. Sql query with offerings

Read more here: Source link