nerdexam
Snowflake

COF-C02 · Question #620

In Snowflake, what allows users to perform recursive queries?

The correct answer is D. CONNECT BY. CONNECT BY is a Snowflake SQL clause (borrowed from Oracle syntax) used to write hierarchical or recursive queries, such as traversing a parent-child org chart or a bill-of-materials tree. It defines the relationship between parent and child rows. Snowflake also supports…

Data Transformations

Question

In Snowflake, what allows users to perform recursive queries?

Options

  • AQUALIFY
  • BLATERAL
  • CPIVOT
  • DCONNECT BY

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    4% (1)
  • D
    92% (22)

Explanation

CONNECT BY is a Snowflake SQL clause (borrowed from Oracle syntax) used to write hierarchical or recursive queries, such as traversing a parent-child org chart or a bill-of-materials tree. It defines the relationship between parent and child rows. Snowflake also supports recursive CTEs (WITH RECURSIVE), but among the listed options, CONNECT BY is the correct answer. QUALIFY filters window-function results, LATERAL enables correlated subqueries, and PIVOT rotates rows into columns - none of these perform recursive traversal.

Topics

#Recursive queries#CONNECT BY#SQL

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice