What is the maximum number of SOQL queries used by the following code?

What is the maximum number of SOQL queries used by the following code?

List<Account> aList = [SELECT Id FROM Account LIMIT 5]; for (Account a : aList){ List<Contact> cList = [SELECT Id FROM Contact WHERE AccountId = :a.Id); }
A . 5
B . 6
C . 1
D . 2

Answer: B

Latest PDI Practice Questions with 191 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
0 Comments