Create the trigger as an atonomus transaction and from it call a function that run your select and return the columns/values you need.