COF-C02 · Question #621
Which table function is used to perform additional processing on the results of a previously-run query?
The correct answer is B. RESULT_SCAN. RESULT_SCAN is a Snowflake table function that retrieves the cached result set of a previously executed query by its query ID (e.g., SELECT * FROM TABLE(RESULT_SCAN(LAST_QUERY_ID()))). This allows you to apply additional SQL processing - filtering, aggregating, joining - on top…
Question
Which table function is used to perform additional processing on the results of a previously-run query?
Options
- AQUERY_HISTORY
- BRESULT_SCAN
- CDESCRIBE_RESULTS
- DQUERY HISTORY BY SESSION
How the community answered
(46 responses)- A4% (2)
- B87% (40)
- C7% (3)
- D2% (1)
Explanation
RESULT_SCAN is a Snowflake table function that retrieves the cached result set of a previously executed query by its query ID (e.g., SELECT * FROM TABLE(RESULT_SCAN(LAST_QUERY_ID()))). This allows you to apply additional SQL processing - filtering, aggregating, joining - on top of a result that is already cached, without re-executing the original query. Results are cached for 24 hours. QUERY_HISTORY and QUERY_HISTORY_BY_SESSION return query execution metadata, not the query's actual data output.
Topics
Community Discussion
No community discussion yet for this question.