
Answer-first summary for fast verification
Answer: UPDATE TABLE FROM STREAM, INSERT INTO TABLE SELECT FROM STREAM
The question asks which SQL commands, when committed, will consume a stream and advance its offset. According to Snowflake documentation and the community consensus (93% selected AC with multiple upvoted comments), streams are consumed and their offsets advanced when used in DML (Data Manipulation Language) operations. Option A (UPDATE TABLE FROM STREAM) and Option C (INSERT INTO TABLE SELECT FROM STREAM) are DML commands that modify data and thus consume the stream. Option B (SELECT FROM STREAM) is a query that reads but does not consume the stream or advance the offset. Option D (ALTER TABLE AS SELECT FROM STREAM) is not a valid Snowflake command and does not consume the stream. Option E (BEGIN COMMIT) is a transaction control command that does not directly consume the stream; while it can lock the stream for consistency in multi-statement transactions, it does not by itself consume or advance the offset. Therefore, A and C are the correct choices.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.