Remove sql query from show and edit pages.