Hard1 markMultiple Choice
Area I: Information SystemsSQLData AnalysisArea I

CPA · Question 08 · Area I: Information Systems

An auditor is examining a SQL query used to generate a report of all sales transactions for the fiscal year 2024. The query is:<br/>SELECT * FROM Sales WHERE SaleDate > '2024-01-01' AND SaleDate < '2024-12-31'.<br/>What is the potential issue with this query regarding data completeness?

Answer options:

A.

It includes transactions from 2025.

B.

It excludes transactions occurring exactly on January 1st and December 31st.

C.

It returns duplicate records.

D.

It fails to filter by Customer ID.

How to approach this question

Analyze the operators. > means 'strictly greater than'. If SaleDate is '2024-01-01', is it > '2024-01-01'? No.

Full Answer

B.It excludes transactions occurring exactly on January 1st and December 31st.✓ Correct
It excludes transactions occurring exactly on January 1st and December 31st.
The operators > (greater than) and < (less than) are exclusive. To include the first and last days of the year, the query should use >= and <=, or the BETWEEN operator.

Common mistakes

Assuming > includes the date specified.

Practice the full CPA ISC Practice Exam 4

82 questions · hints · full answers · grading

More questions from this exam