add running sql query event