4.4 version of get latest activity, further repair - use double GROUP BY
trick to get latest record