minor change to SQL query
Issue #30: group by event persistent tab