Also note that if your data might have loops then you need to change the `UNION ALL` to `UNION` in order to prevent getting stuck in a loop.
Also note that if your data might have loops then you need to change the `UNION ALL` to `UNION` in order to prevent getting stuck in a loop.