fixed SQL query for grouping entered junior handler name