I have process in salesforce in such a way opportunity we can relate this opportunity to this lookup field parent_opportunity__c . Which relates opportunity to other parent opportunity.
I want to write a query parent to child :
select id,(select id from opportunity where parent_opportunity__c!=null) from opportunity where parent_opportunity__c=null
I have worked with different scenarios i cant able to crack it
select id,name,(select id,name from parent_opportunity__r) from opportunity this is showing error and
select id,name,(select id,name from opportunity) from parent_opportunity__c this is also error