A trigger on the Account object fires on update. It queries a related object inside a for loop, then performs a DML operation inside the same loop. Walk me through what’s wrong and fix it.

TechnicalSenior Salesforce DeveloperSalesforce DeveloperSalesforce Engineer