Update query formulator