Sql removing and rearranging the tools