sql version of events report