Question 200
Developers misuse WHERE SUM(Amount) over individual order rows in a grouped report. Which result would provide the strongest acceptance evidence?
Explanation
Correct Answer
HAVING filters groups after aggregation; WHERE filters source rows before aggregation. The observation “Only customers meeting the aggregate threshold appear at the requested group granularity” directly confirms the chosen action worked for this situation: Developers misuse WHERE SUM(Amount) over individual order rows in a grouped report.
Incorrect Answers
JSON array aggregation preserves JSON structure rather than emitting unsafe concatenated text. This observation would not establish that the required result occurred for Developers misuse WHERE SUM(Amount) over individual order rows in a grouped report. The confirming test is: Only customers meeting the aggregate threshold appear at the requested group granularity.
JSON membership functions compare structured content, not formatting-dependent text substrings. This observation would not establish that the required result occurred for Developers misuse WHERE SUM(Amount) over individual order rows in a grouped report. The confirming test is: Only customers meeting the aggregate threshold appear at the requested group granularity.
SQL Server UNIQUE and filtered unique indexes differ in how missing values can be represented. This observation would not establish that the required result occurred for Developers misuse WHERE SUM(Amount) over individual order rows in a grouped report. The confirming test is: Only customers meeting the aggregate threshold appear at the requested group granularity.