Implement the interactive "run" command to run the select query.