CPA · Question 06 · Area I: Information Systems
An auditor is reviewing a SQL query used to extract 'Active Customers' for a marketing report. The query is:<br/><br/>SELECT CustomerID, Name FROM Customers WHERE Status = 'Active' OR Status = 'Pending' AND CreditLimit > 1000<br/><br/>The auditor suspects the logic is flawed because of operator precedence. Which customers will this query actually return?
Answer options:
Customers who are (Active OR Pending) AND have CreditLimit > 1000
Customers who are Active AND have CreditLimit > 1000
Only customers who are Pending AND have CreditLimit > 1000
All 'Active' customers (regardless of credit), plus 'Pending' customers with CreditLimit > 1000
82 questions · hints · full answers · grading