QuestionQ98

VerifiedPrepare data

You have this T-SQL statement.

Question Image

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

Yes or No
StatementsYesNo
The statement returns Region values when a Sales item has a RefundStatus of Refunded.
The statement only returns TransactionDate values that occurred during the current year.
The TotalRevenue calculation aggregates SalesAmount values that have a RefundStatus of Refunded.
Explanation

Region is selected and grouped, while the WHERE clause filters only for the current year, not by refund status. The year predicate restricts processed rows to the current year. The CASE expression supplies SalesAmount only for rows whose RefundStatus is not Refunded; refunded rows add zero to SUM.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!