add event-group.sql - really DONT understand this code.