⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 1 of about 1 for startNode (0.001 sec.)
WITH Clause 9414
The WITH clause allows you to specify common table expressions (CTEs). Regular (non-recursive) common-table-expressions are essentially views that are limited in scope to a particular query. CTEs can reference each other and can be nested. ... 1, 5 and 8. Enumerate All Paths from a Node The following query returns all paths starting in node 1: WITH RECURSIVE paths(startNode, endNode, path) AS ( SELECT -- Define the path as the first edge of the traversal node1id AS startNode, node2id AS endNode ... , [node1id, node2id] AS path FROM edge WHERE startNode = 1 UNION ALL SELECT -- Concatenate new edge to the path paths.startNode AS startNode, node2id AS endNode, array_append(pa ... repeated node to the path. -- This ensures that no cycles occur. WHERE list_position(paths.path, node2id) IS NULL ) SELECT startNode, endNode, path FROM paths ORDER BY length(path), path; startNode endNode path 1 3 [1, 3] 1 5 [1, 5] 1 5 [1, 3, 5] 1 8 [1, ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/with.html
PREV 1 NEXT
DuckDB 2.0 Documentation / man.mtool.work