Changed group by criteria for currentTitles to enable having clause