Need to run the Recursive SQL query on PySpark or data farm for following scneri This is an example in Development: