Answers for "Select id,name,(select id from contacts)(select id from Opportunity) from Account"

0

Select id,name,(select id from contacts)(select id from Opportunity) from Account

List<Account> accounts = [SELECT Id, Name, (SELECT id FROM Contacts), (SELECT id FROM opportunities) FROM Account];

for (Account a : accounts) {
     System.debug('Count of Opportunities is ' + a.Opportunities.size());
     System.debug('Count of Contacts is ' + a.Contacts.size());
}
Posted by: Guest on August-29-2020

Code answers related to "Select id,name,(select id from contacts)(select id from Opportunity) from Account"

Browse Popular Code Answers by Language