reformat query preview