Format query percentages correctly