Hard1 markMultiple Choice
CPA · Question 26 · Area I: Information Systems
Review the following SQL query:<br/>SELECT CustomerID, SUM(OrderAmount)<br/>FROM Orders<br/>GROUP BY CustomerID<br/>HAVING SUM(OrderAmount) > 10000;<br/><br/>What is the purpose of this query?
Review the following SQL query:<br/>SELECT CustomerID, SUM(OrderAmount)<br/>FROM Orders<br/>GROUP BY CustomerID<br/>HAVING SUM(OrderAmount) > 10000;<br/><br/>What is the purpose of this query?
Answer options:
A.
To list all individual orders greater than 10,000.
B.
To identify customers whose total order value exceeds 10,000.
C.
To count the number of orders per customer.
D.
To delete orders greater than 10,000.
How to approach this question
Analyze the aggregate function (SUM) and the filter (HAVING).
Full Answer
B.To identify customers whose total order value exceeds 10,000.✓ Correct
To identify customers whose total order value exceeds 10,000.
The query groups orders by CustomerID, calculates the total (SUM) for each, and then the HAVING clause filters to show only those totals > 10,000.
Common mistakes
Confusing WHERE (filters rows before grouping) with HAVING (filters groups after aggregation).
Practice the full CPA ISC Practice Exam 5
82 questions · hints · full answers · grading
More questions from this exam
Q01A service organization provides a cloud-based payroll processing application to its user entities...MediumQ02An auditor is reviewing the shared responsibility model for a client using an Infrastructure as a...HardQ03A financial institution requires a cloud deployment model that offers the highest level of contro...MediumQ04During an IT audit, you observe that a company uses a 'Hybrid Cloud' architecture. Which scenario...MediumQ05Which component of IT architecture is primarily responsible for translating domain names (like ww...Easy
Expert