Fixed query sort with script builder