Query Script Generation Failed