Use the original query, not the formatted result

Signed-off-by: David Celis <me@davidcel.is>