SnowPro Core Certification — Question 541

Which function should be used to find the query ID of the second query executed in a current session?

Answer options

Correct answer: D

Explanation

The correct answer is D, as LAST_QUERY_ID(2) retrieves the ID of the second query in the session. Options A and B reference negative indices, which indicate the most recent queries, and C references the first query, making them incorrect for this question.