Update mapper.php

fix group by queries failing