bad SQL in Event.special scope