Exam DAA-C01 Topic 1 Question 61 Discussion

Actual exam question for Snowflake's DAA-C01 exam
Question #: 61
Topic #: 1
You are tasked with validating the data in a 'SALES table. The table contains 'ORDER ID', 'CUSTOMER ID', 'PRODUCT ID, 'SALE DATE, and 'SALE AMOUNT'. You need to identify orders where the 'SALE AMOUNT is negative or zero, indicating potential data entry errors, and also find orders with duplicate 'ORDER ID' values but different 'SALE AMOUNT values. Which of the following queries, when combined, would efficiently achieve this validation?

Suggested Answer: E Vote an answer

The first query 'SELECT ORDER ID, SALE_AMOUNT FROM SALES WHERE SALE AMOUNT O;' identifies orders with non- positive sale amounts. The second query 'SELECT ORDER_ID, FROM SALES GROUP BY ORDER_ID HAVING COUNT(DISTINCT SALE_AMOUNT) > 1;' efficiently finds ORDER_lDs that have multiple distinct SALE_AMOUNT values, indicating duplicates with conflicting data. "ANY _ VALUE is used since we only care about the 'ORDER_ID'.

by Megan at Mar 13, 2026, 10:06 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10