updated recent activity sql statement