Added a trim function to the query.