modified activities fetch sql