missed sql query condition in event list