Microsoft
MB-500 · Question #341
A company uses Dynamics 365 Supply Chain Management. You are performing a review of the code that returns the total sum of transactions for all customers in customer group 10. You observe that the…
The correct answer is A. Select sum(AmountMst) from custTrans join custId, custGroup from custTable where. Use a JOIN, and move custTable.custGroup == '10' into a WHERE statement.
Implement security and optimize performance
Question
A company uses Dynamics 365 Supply Chain Management. You are performing a review of the code that returns the total sum of transactions for all customers in customer group 10. You observe that the following query takes a long time to complete. You need to modify the query to optimize performance. Which code segment should you use?
Exhibit
Options
- ASelect sum(AmountMst) from custTrans join custId, custGroup from custTable where
- BAmountMST sumTrans = 0; while select AmountMst from custTrans join custTable where
- Cselect sum(AmountMst) from custTrans join custTable where custTable.AccountNum ==
- Dselect sum(AmountMst) from custTrans exists join custTable where custTable.AccountNum ==
How the community answered
(62 responses)- A55% (34)
- B29% (18)
- C5% (3)
- D11% (7)
Explanation
Use a JOIN, and move custTable.custGroup == '10' into a WHERE statement.
Topics
#query optimization#X++ SQL#exists join#performance
Community Discussion
No community discussion yet for this question.
