Method Query_TreeCountWithParentIdsSql(string)
SQL for tree COUNT with parent_ids array.
PostgreSQL: SELECT (result->>'total_count')::int FROM func(...) as result
MSSQL: temp table + JSON_VALUE
string Query_TreeCountWithParentIdsSql(string functionName)