CSV output of events table from DB