Follow the steps below until the issue is resolved: 
  1. Recreate the query from scratch.
  2. Break the query into smaller queries and merge.