Logstash JDBC insert after select completes

Hey All
Just looking to understand if there is some way that I can run a SQL INSERT before and after a SELECT statement in the filter section to update a tracking table in the DB to say that the select query has started and finished.
Any and all help would be appreciated.