Q&A for administrators and users of the CiviCRM Constituent Relationship Management software
select Reputation , DisplayName,Location,Name,Date from Badges join Users on Users.Id = Badges.Id WHERE Name like 'Enl%' and Location like 'South Africa%' and Date >= '20160101 00:00:00.000' and Date <= '20161231 00:00:00.000' Group by DisplayName, Location,Reputation,Name,Date order by Reputation desc ,Date desc;