Nested join Query failing with spool out error.

Database
Fan

Nested join Query failing with spool out error.