nerdexam
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

MB-500 question #341 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)
  • A
    55% (34)
  • B
    29% (18)
  • C
    5% (3)
  • D
    11% (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.

Full MB-500 Practice