I need to frame a SOQL in such a way that, from child i have to get the parent name and then i also need to get some data of another child of the same parent.
Example :
I have 3 objects
Invoice Subscription Billing Account.
Invoice (Child) ------> Billing Account (Parent) Subscription (Child) -------> Billing Account (Parent)
From Invoices , i needs to get the information of Subscription via Billing Account .
Please find the query i framed
select Name,UM_Billing_Location__r.Name,UM_Billing_Location__r.csconta__Account__r.Name,(select Name from UM_Billing_Location__r.csord__Subscription__r) from UM_InvoiceHeader__c
I dont think so this part is correct (select Name from UM_Billing_Location__r.csord__Subscription__r)
Kindly help Thanks