BAC-336: use GROUP BY instead of DISTINCT
Merge pull request #943 from Wikia/bac-177-stats-events

BAC-336: use GROUP BY instead of DISTINCT