Version 1.1
SELECT * FROM nTree ( ON input_table PARTITION BY partition_columns [ ORDER BY ordering_columns] Root_Node (boolean_expression) Node_ID (expression) Parent_ID (expression) Allow_Cycles ({'true'|'t'|'yes'|'y'|'1'|'false'|'f'|'no'|'n'|'0'}) Starts_With ({ 'root' | 'leaf' | expression }) Mode ({ 'up' | 'down' }) Output ({ 'end' | 'all' }) [ Max_Distance (expression) ] [ Logging ({'true'|'t'|'yes'|'y'|'1'|'false'|'f'|'no'|'n'|'0'})] Result (aggregate [,...]) );