SSP-1372 added joins to getAll for challengeReferrals and selfhelpQuestions significant reduction.
SSP-1372 added distinct requirement and fixed sorting behavior in ui