Hi,<BR><BR>I am trying to count the number of children, granchildren, etc that a Parent Category can have. I am using Oracle and everything is in one table with a FunctionID and a ParentID column. Anyways, this is what it looks like:<BR><BR>SELECT FunctionID, FunctionName,(SELECT COUNT(*) AS Count FROM <BR>(SELECT FUNCTIONID, FUNCTIONNAME, LEVEL, SYS_CONNECT_BY_PATH(FUNCTIONNAME, &#039; &#062; &#039;) "PATH" FROM FUNCTION START WITH FUNCTIONID = 33 CONNECT BY PRIOR FUNCTIONID = FUNCTIONPARENTID ) Function) AS COUNT FROM Function WHERE FunctionParentID IS NULL ORDER BY FunctionName;<BR><BR>This works well and I get all the parent categories I need. But I would like the Count to display total number of children for each Parent Category instead of just ID 33. Using a fixed ID I get 27 for each of my parents and I know this is incorrect. How can I set the FunctionID to be the current FunctionID? If I change the 33 to FunctionID so that FunctionID = FunctionID I get an error. Please help!<BR><BR>