Modified sql of event for new columns