Query translation modified to handle Multi-DB queries