Added a function to execute a single Query.